-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostics in MIR passes (arithmetic_overflow, unconditional_panic) are not caught with cargo check
#49292
Comments
Some / all of the simd failures would need to move typeck from librustc_typeck to MIR typeck to avoid monomorphization time errors. This is something that should be done anyways and AFAICT there is no tracking issue for it. |
Here's a current example of this: fn main() {
let _val = 14u8 + 255;
} The "overflow" diagnostic does not trigger with I think the fix here would be to move this somewhere that is actually run during rust/compiler/rustc_mir_transform/src/lib.rs Line 496 in 795ade0
I'm a bit surprised that doesn't already happen... I assume we do call mir_drops_elaborated_and_const_checked since that's where |
It would probably make sense to distinguish between "just produce the rmeta file as fast as possible" ( |
Besides const_prop_lint, another pass that can emit errors is lower_intrinsics. @rust-lang/wg-mir-opt if you know any other MIR passes that can emit errors or lints, please post them here. Also in the interest of keeping the differences between check and build as small as possible, it'd be good to avoid adding more such passes. :) |
We can move the lower_intrinsics diagnostics to mir typeck. |
…henkov Don't report any errors in `lower_intrinsics`. Intrinsics should have been type checked earlier. This is part of moving all mir-opt diagnostics early enough so that they are reliably emitted even in check builds: rust-lang#49292 (comment)
…nkov Don't report any errors in `lower_intrinsics`. Intrinsics should have been type checked earlier. This is part of moving all mir-opt diagnostics early enough so that they are reliably emitted even in check builds: rust-lang#49292 (comment)
cargo check
cargo check
I just tried to ran the compile-fail suite without trans, and these tests failed:
All of those happens somewhere inside librustc_mir, most of them being monomorphization. This corresponds to
translation item collection
pass, which takes nontrivial amount of time.Though, we should to try to evaluate things like struct layout, symbols even when we're doing
check
to catch all kind of errors.The text was updated successfully, but these errors were encountered: