]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-55511.stderr
Rollup merge of #106946 - dtolnay:hashlinecolumn, r=m-ou-se
[rust.git] / tests / ui / nll / issue-55511.stderr
1 error[E0597]: `a` does not live long enough
2   --> $DIR/issue-55511.rs:13:28
3    |
4 LL |     let a = 22;
5    |         - binding `a` declared here
6 LL |     let b = Some(Cell::new(&a));
7    |                            ^^ borrowed value does not live long enough
8 ...
9 LL |         <() as Foo<'static>>::C => { }
10    |         ----------------------- type annotation requires that `a` is borrowed for `'static`
11 ...
12 LL | }
13    | - `a` dropped here while still borrowed
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0597`.