ICE: "unexpected predicate" when using multiple lifetime parameters in existential type #55903
Labels
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
I have encountered an internal compiler error using Rust 1.32.0 nightly. It seems to occur when using multiple lifetime parameters in an existential type.
I can reproduce the error by using the following code in
lib.rs
. I am not sure if this code should compile or not (I am new to Rust and trying to learn how existential types work), but I know it shouldn't cause an ICE. (TheClone
trait bound here is just a placeholder to keep the example simple. The ICE seems to still happen ifClone
is replaced by any other trait bound.)The output of
cargo build --verbose
is as follows:If I change the code to only use one lifetime parameter as follows, the ICE doesn't happen and the code compiles successfully:
rustc --version --verbose
on my system yields:The text was updated successfully, but these errors were encountered: