-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
not-blocking-coherenceAn issue we can resolve after stabilizing the new solver during coherenceAn issue we can resolve after stabilizing the new solver during coherence
Description
trait StaticTy {
type Item<'a>: 'static;
}
impl StaticTy for () {
type Item<'a> = &'a ();
//~^ ERROR the type `&'a ()` does not fulfill the required lifetime
}
fn main() {}
This code passes with -Ztrait-solver=next
in check_type_bounds
since we don't normalize the types that show up in type-outlives bounds, so we end up seeing a ty::Alias
during process_registered_region_obligations
and end up using the item bounds :/
We might need to pass a normalization fn down to process_registered_region_obligations
like we do for trait_ref_is_knowable
?
Metadata
Metadata
Assignees
Labels
not-blocking-coherenceAn issue we can resolve after stabilizing the new solver during coherenceAn issue we can resolve after stabilizing the new solver during coherence
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
compiler-errors commentedon Sep 20, 2023
This is because we register the item bounds without actually replacing the self type in
check_type_bounds
. I don't think we should be replacing the self type, I also don't know what we could do to fix this honestly.