2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `pointer` does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
--> $DIR/wf-method-late-bound-regions.rs:31:5
|
|
|
|
|
|
|
|
|
30 | f2.xmute(&pointer) //~ ERROR `pointer` does not live long enough
|
|
|
|
| ------- borrow occurs here
|
|
|
|
31 | };
|
|
|
|
| ^ `pointer` dropped here while still borrowed
|
|
|
|
32 | println!("{}", dangling);
|
|
|
|
33 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
2017-05-22 06:46:05 -05:00
|
|
|
error: aborting due to previous error(s)
|
2016-10-26 11:10:39 -05:00
|
|
|
|