]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-40157.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / span / issue-40157.stderr
1 error[E0597]: `foo` does not live long enough
2   --> $DIR/issue-40157.rs:12:53
3    |
4 LL |     {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    |      borrowed value needs to live until here
10    |
11    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0597`.