Skip to content
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

Merged
merged 2 commits into from
Jan 12, 2018

Conversation

topecongiro
Copy link
Contributor

Closes #43105.

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Jan 12, 2018

cc @oli-obk @nikomatsakis

@@ -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)
Copy link
Member

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.

Copy link
Contributor Author

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().

@eddyb
Copy link
Member

eddyb commented Jan 12, 2018

@bors r+ Thanks!

@bors
Copy link
Contributor

bors commented Jan 12, 2018

📌 Commit 42410a9 has been approved by eddyb

kennytm added a commit to kennytm/rust that referenced this pull request Jan 12, 2018
Ignore CTFE errors while lowering patterns

Closes rust-lang#43105.

r? @eddyb
bors added a commit that referenced this pull request Jan 12, 2018
@bors bors merged commit 42410a9 into rust-lang:master Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants