summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/auxiliary/issue-17662.rs
blob: 75efe110cdfd9248b6ec774eab74ccce411adb0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![crate_type = "lib"]

pub trait Foo<'a, T> {
    fn foo(&'a self) -> T;
}

pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {
    let x: &'a Foo<T> = x;
    //            ^ the lifetime parameter of Foo is left to be inferred.
    x.foo()
    // ^ encoding this method call in metadata triggers an ICE.
}