fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
632 B17 linesraw
1error[E0713]: borrow may still be in use when destructor runs
2  --> $DIR/issue28498-reject-ex1.rs:34:29
3   |
4LL |     foo.data[0].1.set(Some(&foo.data[1]));
5   |                             ^^^^^^^^
6...
7LL | }
8   | -
9   | |
10   | here, drop of `foo` needs exclusive access to `foo.data`, because the type `Foo<Concrete<'_>>` implements the `Drop` trait
11   | borrow might be used here, when `foo` is dropped and runs the `Drop` code for type `Foo`
12   |
13   = note: consider using a `let` binding to create a longer lived value
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0713`.