fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
533 B17 linesraw
1error[E0597]: `*x` does not live long enough
2  --> $DIR/regions-infer-borrow-scope-within-loop.rs:13:20
3   |
4LL |         let x = make_box();
5   |             - binding `x` declared here
6...
7LL |         y = borrow(&*x);
8   |                    ^^^ borrowed value does not live long enough
9...
10LL |     }
11   |     - `*x` dropped here while still borrowed
12LL |     assert!(*y != 0);
13   |             -- borrow later used here
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0597`.