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

23 lines
577 B
Plaintext
Raw Normal View History

2018-07-15 16:11:54 -05:00
warning: not reporting region error due to nll
--> $DIR/issue-17758.rs:17:9
|
LL | self.foo();
| ^^^^
warning: not reporting region error due to nll
--> $DIR/issue-17758.rs:17:14
|
LL | self.foo();
| ^^^
error: borrowed data escapes outside of closure
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 closure body
2018-07-15 16:11:54 -05:00
LL | self.foo();
| ^^^^^^^^^^ `self` escapes the closure body here
2018-07-15 16:11:54 -05:00
error: aborting due to previous error