impossible case reached on lifetime inference for impl Trait in return position #49926
Labels
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Uh oh!
There was an error while loading. Please reload this page.
summery
when the inferred associated types of the trait contain lifetimes, the compiler produces an internal error
details
I tried this code:
I expected to see this happen:
the return type is inferred to be
impl Iterator<Item=&'static str>
,which, when written like that, is accepted by the compiler.
Instead, this happened:
Meta
Backtrace
The text was updated successfully, but these errors were encountered: