Closed
Description
#![feature(type_alias_impl_trait)]
pub type Successors<'a> = impl Iterator<Item = &'a ()>;
pub fn f<'a>() -> Successors<'a> {
None.into_iter()
}
trait Tr {
type Item;
}
impl<'a> Tr for &'a () {
type Item = Successors<'a>;
}
fn ohno<'a>() -> <&'a () as Tr>::Item {
None.into_iter()
}
gives:
error: internal compiler error: free_scope: DefId(0:3 ~ playground[ad24]::Successors[0]) not recognized by the region scope tree for None / Some(DefId(0:13 ~ playground[ad24]::ohno[0]))
My guess is that this has the same underlying cause as #56445, but this one doesn't involve associated consts or arrays at all, so it might be different still.
Metadata
Metadata
Assignees
Labels
Area: Associated items (types, constants & functions)Area: Lifetimes / regionsArea: Trait systemCategory: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.`#[feature(type_alias_impl_trait)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.This issue requires a nightly compiler in some way.
Type
Projects
Status
Done