-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE in mir building with captured value of unresolved type, None
in compiler/rustc_mir_build/src/build/expr/as_place.rs
#110453
Comments
rust/compiler/rustc_mir_build/src/build/expr/as_place.rs Lines 256 to 263 in e49122f
Looks like it can't resolve the closure upvar in MIR building. |
bisection shows that this has been broken since ~forever |
Seems to require edition 2021 capturing |
might be related to #108683 |
Slightly smaller repro pub struct B;
pub fn a() -> B { B }
mod handlers {
pub struct C(B);
pub fn c() -> impl Fn() -> C {
let a1 = ();
|| C((crate::a(), a1).into())
}
} Moving |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium +T-compiler |
None
in compiler/rustc_mir_build/src/build/expr/as_place.rs
another repro: fn dup(f: impl Fn(i32) -> i32) -> impl Fn(as_str) -> i32 {
move |a| f(a * 2)
} |
This repro doesn't ICE on stable, only nightly, whereas the other repros ICE on both. Possibly another bug? |
Hmm interesting, query stack seemed pretty much the same from what I saw. I could imagine that the code change now causes the former ICE to pop up in additional places now? |
Fixed by #118751 I think |
Oh we should add a test! Can also grab one from #117802 |
…ype, None in compiler/rustc_mir_build/src/build/expr/as_place.rs rust-lang#110453 Fixes rust-lang#110453
add even more tests! Fixes rust-lang#109869 Fixes rust-lang#110453 Fixes rust-lang#109020 Fixes rust-lang#108580 Fixes rust-lang#108220 Fixes rust-lang#113045 Fixes rust-lang#113133 Fixes rust-lang#114464 Fixes rust-lang#116599 Fixes rust-lang#119731
Rollup merge of rust-lang#122988 - matthiaskrgr:icetests, r=petrochenkov add even more tests! Fixes rust-lang#109869 Fixes rust-lang#110453 Fixes rust-lang#109020 Fixes rust-lang#108580 Fixes rust-lang#108220 Fixes rust-lang#113045 Fixes rust-lang#113133 Fixes rust-lang#114464 Fixes rust-lang#116599 Fixes rust-lang#119731
Code
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1977129cfed4ad3641190eef3e6ebc97
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: