about summary refs log tree commit diff
path: root/tests/ui/borrowck/alias-liveness/name-region.rs
blob: 9545a9eed2f1309ba665afa58903f123f3c9bee9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Make sure we don't ICE when trying to name the regions that appear in the alias
// of the type test error.

trait AnotherTrait {
    type Ty2<'a>;
}

fn test_alias<T: AnotherTrait>(_: &'static T::Ty2<'_>) {
    let _: &'static T::Ty2<'_>;
    //~^ ERROR the associated type `<T as AnotherTrait>::Ty2<'_>` may not live long enough
}

fn main() {}