rust/tests/ui/nll/user-annotations/region-error-ice-109072.rs
2024-03-20 17:29:58 +00:00

16 lines
355 B
Rust

// Regression test for #109072.
// Check that we don't ICE when canonicalizing user annotation.
trait Lt<'a> {
type T;
}
impl Lt<'missing> for () { //~ ERROR undeclared lifetime
type T = &'missing (); //~ ERROR undeclared lifetime
}
fn main() {
let _: <() as Lt<'_>>::T = &();
//~^ ERROR the trait bound `(): Lt<'_>` is not satisfied
}