]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/method-ufcs-inherent-2.rs
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / ui / nll / user-annotations / method-ufcs-inherent-2.rs
1 // Check that substitutions given on the self type (here, `A`) can be
2 // used in combination with annotations given for method arguments.
3
4 struct A<'a> { x: &'a u32 }
5
6 impl<'a> A<'a> {
7     fn new<'b, T>(x: &'a u32, y: T) -> Self {
8         Self { x }
9     }
10 }
11
12 fn foo<'a>() {
13     let v = 22;
14     let x = A::<'a>::new::<&'a u32>(&v, &v);
15     //~^ ERROR
16     //~| ERROR
17 }
18
19 fn main() {}