]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-31567.stderr
Rollup merge of #105216 - GuillaumeGomez:rm-unused-gui-test, r=notriddle
[rust.git] / src / test / ui / nll / issue-31567.stderr
1 error[E0713]: borrow may still be in use when destructor runs
2   --> $DIR/issue-31567.rs:10:26
3    |
4 LL | fn get_dangling<'a>(v: VecWrapper<'a>) -> &'a u32 {
5    |                 -- lifetime `'a` defined here
6 LL |     let s_inner: &'a S = &*v.0;
7    |                  -----   ^^^^^
8    |                  |
9    |                  type annotation requires that `*v.0` is borrowed for `'a`
10 LL |     &s_inner.0
11 LL | }
12    | - here, drop of `v` needs exclusive access to `*v.0`, because the type `VecWrapper<'_>` implements the `Drop` trait
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0713`.