]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / user-annotations / method-ufcs-inherent-1.rs
1 // Check that substitutions given on the self type (here, `A`) carry
2 // through to NLL.
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(&v, 22);
15 //~^ ERROR
16 }
17
18 fn main() {}