rust/src/test/ui/issues/issue-17758.nll.stderr

11 lines
321 B
Plaintext
Raw Normal View History

error: borrowed data escapes outside of function
2018-07-15 16:11:54 -05:00
--> $DIR/issue-17758.rs:17:9
|
LL | fn bar(&self) {
| ----- `self` is a reference that is only valid in the function body
2018-07-15 16:11:54 -05:00
LL | self.foo();
| ^^^^^^^^^^ `self` escapes the function body here
2018-07-15 16:11:54 -05:00
error: aborting due to previous error