]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/wf-self-type.rs
Re-add #[allow(unused)] attr
[rust.git] / tests / 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() {}