forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak wording and spans of closure lifetime errors
- Loading branch information
Showing
6 changed files
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
error: borrowed data cannot be stored outside of its closure | ||
--> $DIR/regions-escape-bound-fn.rs:18:27 | ||
| | ||
17 | let mut x: Option<&isize> = None; | ||
| ----- borrowed data cannot be stored into here... | ||
18 | with_int(|y| x = Some(y)); | ||
| --- -----^- | ||
| | | | | ||
| | | cannot be stored outside of its closure | ||
| | cannot infer an appropriate lifetime | ||
| borrowed data cannot outlive this closure | ||
| --- ^ cannot be stored outside of its closure | ||
| | | ||
| ...because it cannot outlive this closure | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
error: borrowed data cannot be stored outside of its closure | ||
--> $DIR/regions-escape-unboxed-closure.rs:16:32 | ||
| | ||
15 | let mut x: Option<&isize> = None; | ||
| ----- borrowed data cannot be stored into here... | ||
16 | with_int(&mut |y| x = Some(y)); | ||
| --- -----^- | ||
| | | | | ||
| | | cannot be stored outside of its closure | ||
| | cannot infer an appropriate lifetime | ||
| borrowed data cannot outlive this closure | ||
| --- ^ cannot be stored outside of its closure | ||
| | | ||
| ...because it cannot outlive this closure | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters