Closed
Description
Summary
Additional problems were that, because of amount of generated warnings, message about broken code got scrolled outside console's buffer. Maybe there should be extra, short message about broken code at the end?
"Changes reverted because of broken code, full notice at the top."
Also, actual error was without colors, and in the middle of all warnings, making it hard to notice. Maybe don't emit warnings in that case? (with flag to turn them back on: --show-warnings-on-broken-code
?)
Reproducer
Currently this:
unsafe fn thing() -> i32 { ... }
fn foo() -> i32 {
unsafe { return thing() };
}
will get --fix
ed into:
fn foo() -> i32 {
unsafe { thing() };
}
Version
rustc 1.63.0 (4b91a6ea7 2022-08-08)
binary: rustc
commit-hash: 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f
commit-date: 2022-08-08
host: x86_64-pc-windows-msvc
release: 1.63.0
LLVM version: 14.0.5
Additional Labels
@rustbot label +I-suggestion-causes-error