]> git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/user-annotations/wf-self-type.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / user-annotations / wf-self-type.rs
1 struct Foo<'a, 'b: 'a>(&'a &'b ());
2
3 impl<'a, 'b> Foo<'a, 'b> {
4 fn xmute(a: &'b ()) -> &'a () {
5 unreachable!()
6 }
7 }
8
9 pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {
10 Foo::xmute(u) //~ ERROR lifetime may not live long enough
11 }
12
13 fn main() {}