-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Ignore CTFE errors while lowering patterns #47382
Conversation
src/librustc_const_eval/pattern.rs
Outdated
@@ -280,7 +280,7 @@ impl<'a, 'tcx> Pattern<'tcx> { | |||
let mut pcx = PatternContext::new(tcx, param_env_and_substs, tables); | |||
let result = pcx.lower_pattern(pat); | |||
if !pcx.errors.is_empty() { | |||
span_bug!(pat.span, "encountered errors lowering pattern: {:?}", pcx.errors) | |||
debug!("encountered errors lowering pattern: {:?}", pcx.errors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, can't this be tcx.sess.delay_span_bug
? That would make sure we have some other error emitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that worked. I am going to add a commit to replace debug!()
with delay_span_bug()
.
@bors r+ Thanks! |
📌 Commit 42410a9 has been approved by |
Ignore CTFE errors while lowering patterns Closes rust-lang#43105. r? @eddyb
Closes #43105.
r? @eddyb