"Found unstable fingerprints for optimized_mir" ICE when moving a dot in a method call chain between lines within a function with an impl Trait
parameter
#119353
Labels
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Related to #84970.
Code
Filename: main.rs
Filename: lib.rs
At this point run
cargo build
, which should work fine. Then move the trailing dot in line 2 like this:Filename: lib.rs
Now run
cargo build
and observe the ICE.Some relevant observations:
foo()
needs to be in lib.rs or in a deeper module. Having both in lib.rs also doesn't work.impl Trait
parameter is necessary (there's no ICE without it), and any trait seems to work.foo()
don't seem to matter; the key is that there's a chain of method calls on separate lines and that a dot is moved from trailing position in line n to leading position in line n + 1 or vice versa.Meta
rustc --version --verbose
:Also reproduced on nightly:
Error output
Output + backtrace
The text was updated successfully, but these errors were encountered: