Open
Description
We should emit the same error message here regardless of whether the projection type contains bound regions.
fn test<'x>() {
use std::ops::Deref;
None::<for<'y> fn(<&'x Option<()> as Deref>::Target::Some)>;
//~^ ERROR expected type, found variant
None::<for<'y> fn(<&'y Option<()> as Deref>::Target::Some)>;
//~^ ERROR ambiguous associated type
}
I discovered this in #101947 and added a FIXME comment.
@rustbot label T-compiler C-bug A-resolve