]>
Commit | Line | Data |
---|---|---|
7cac9316 | 1 | error[E0597]: `*x` does not live long enough |
c30ab7b3 SL |
2 | --> $DIR/regions-infer-borrow-scope-within-loop.rs:28:5 |
3 | | | |
4 | 24 | y = borrow(&*x); //~ ERROR `*x` does not live long enough | |
5 | | -- borrow occurs here | |
6 | ... | |
7 | 28 | } | |
8 | | ^ `*x` dropped here while still borrowed | |
9 | 29 | assert!(*y != 0); | |
10 | 30 | } | |
11 | | - borrowed value needs to live until here | |
12 | ||
041b39d2 | 13 | error: aborting due to previous error |
c30ab7b3 | 14 |