-
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
Do not ICE on closure typeck #67071
Do not ICE on closure typeck #67071
Conversation
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.
LGTM
@@ -2214,6 +2214,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { | |||
} | |||
|
|||
let span = self.tcx.def_span(generator_did); | |||
// Do not ICE on closure typeck (#66868). | |||
if let None = self.tcx.hir().as_local_hir_id(generator_did) { |
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.
I wonder if this would be fixed by these changes.
Super minor nit:
if let None = self.tcx.hir().as_local_hir_id(generator_did) { | |
if self.tcx.hir().as_local_hir_id(generator_did).is_none() { |
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.
I wonder if this would be fixed by these changes.
Seems like it could.
r=me when CI passes |
@bors r=davidtwco rollup |
📌 Commit 22c65f9 has been approved by |
Do not ICE on closure typeck Tackle rust-lang#66868. r? @davidtwco
Rollup of 10 pull requests Successful merges: - #66606 (Add feature gate for mut refs in const fn) - #66841 (Add `{f32,f64}::approx_unchecked_to<Int>` unsafe methods) - #67009 (Emit coercion suggestions in more places) - #67052 (Ditch `parse_in_attr`) - #67071 (Do not ICE on closure typeck) - #67078 (accept union inside enum if not followed by identifier) - #67090 (Change "either" to "any" in Layout::from_size_align's docs) - #67092 (Fix comment typos in src/libcore/alloc.rs) - #67094 (get rid of __ in field names) - #67102 (Add note to src/ci/docker/README.md about multiple docker images) Failed merges: - #67101 (use `#[allow(unused_attributes)]` to paper over incr.comp problem) r? @ghost
…-DPC Add regression tests for fixed ICEs Closes rust-lang#61747 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66205 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66270 (fixed by rust-lang#66246) Closes rust-lang#66868 (fixed by rust-lang#67071) Closes rust-lang#67424 (fixed by rust-lang#67160) Also picking a minor nit up from rust-lang#67071 with 101dd7b r? @Centril
…-DPC Add regression tests for fixed ICEs Closes rust-lang#61747 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66205 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66270 (fixed by rust-lang#66246) Closes rust-lang#66868 (fixed by rust-lang#67071) Closes rust-lang#67424 (fixed by rust-lang#67160) Also picking a minor nit up from rust-lang#67071 with 101dd7b r? @Centril
Add regression tests for fixed ICEs Closes rust-lang#61747 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66205 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66270 (fixed by rust-lang#66246) Closes rust-lang#67424 (fixed by rust-lang#67160) Also picking a minor nit up from rust-lang#67071 with 101dd7b r? @Centril
Add regression tests for fixed ICEs Closes rust-lang#61747 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66205 (fixed from 1.41.0-nightly (4007d4e 2019-12-01)) Closes rust-lang#66270 (fixed by rust-lang#66246) Closes rust-lang#67424 (fixed by rust-lang#67160) Also picking a minor nit up from rust-lang#67071 with 101dd7b r? @Centril
Tackle #66868.
r? @davidtwco