]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-55394.rs
deb1034525edb6622bb754018c849764ef4db19d
[rust.git] / src / test / ui / nll / issue-55394.rs
1 #![feature(nll)]
2
3 struct Bar;
4
5 struct Foo<'s> {
6     bar: &'s mut Bar,
7 }
8
9 impl Foo<'_> {
10     fn new(bar: &mut Bar) -> Self {
11         Foo { bar } //~ERROR lifetime may not live long enough
12     }
13 }
14
15 fn main() { }