]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17758.nll.stderr
Auto merge of #53286 - nagisa:cast-assumes, r=eddyb
[rust.git] / src / test / ui / issues / issue-17758.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/issue-17758.rs:17:9
3    |
4 LL |         self.foo();
5    |         ^^^^
6
7 warning: not reporting region error due to nll
8   --> $DIR/issue-17758.rs:17:14
9    |
10 LL |         self.foo();
11    |              ^^^
12
13 error: borrowed data escapes outside of function
14   --> $DIR/issue-17758.rs:17:9
15    |
16 LL |     fn bar(&self) {
17    |            ----- `self` is a reference that is only valid in the function body
18 LL |         self.foo();
19    |         ^^^^^^^^^^ `self` escapes the function body here
20
21 error: aborting due to previous error
22