]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/method-ufcs-inherent-4.rs
Re-add #[allow(unused)] attr
[rust.git] / tests / ui / nll / user-annotations / method-ufcs-inherent-4.rs
1 // Check that inherent methods invoked with `<T>::new` style
2 // carry their annotations through to NLL in connection with
3 // method type parameters.
4
5 struct A<'a> { x: &'a u32 }
6
7 impl<'a> A<'a> {
8     fn new<'b, T>(x: &'a u32, y: T) -> Self {
9         Self { x }
10     }
11 }
12
13 fn foo<'a>() {
14     let v = 22;
15     let x = <A<'a>>::new::<&'a u32>(&v, &v);
16     //~^ ERROR
17     //~| ERROR
18 }
19
20 fn main() {}