-
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
Follow up on const_eval.rs
check_match
call
#59378
Comments
Super-High-Level Instructions: Replace https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval.rs#L617-L632 with if def_id.is_local() && tcx.typeck_tables_of(def_id).tainted_by_errors {
return Err(ErrorHandled::Reported);
} And then follow up by making sure that the compiler doesn't ICE anywhere (e.g. during MIR building). It should probably "just work" nowadays. A crater run isn't necessary, as this will only ICE if an error wasn't handled properly. Successfully compiling code is unaffected. |
@oli-obk I took a look at this and all tests seem fine in However I just wanted to check https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval.rs#L625-L627 is no longer needed? Pretty unfamiliar with this code so I wanted to confirm before submitting as it's not explicitly mentioned in the other thread that it should be removed. |
Yes that should be removed, too. It will automatically be run when fetching the MIR of the current constant. |
Remove check_match from const_eval This fixes rust-lang#59378. It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
#59199 (comment)
The text was updated successfully, but these errors were encountered: