fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
676 B13 linesraw
1error[E0597]: `foo` does not live long enough
2  --> $DIR/issue-40157.rs:2:53
3   |
4LL |     {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });}
5   |                             ------------------------^^^---------
6   |                             |                       |          |
7   |                             |                       |          `foo` dropped here while still borrowed
8   |                             |                       borrowed value does not live long enough
9   |                             borrow later used here
10
11error: aborting due to previous error
12
13For more information about this error, try `rustc --explain E0597`.