rust/tests/ui/nll/user-annotations/region-error-ice-109072.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
294 B
Rust
Raw Normal View History

// 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 = &();
}