-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae3feec
commit 8718665
Showing
6 changed files
with
17 additions
and
17 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
6 changes: 3 additions & 3 deletions
6
src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr
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,10 +1,10 @@ | ||
error[E0611]: explicit lifetime required in the type of `x` | ||
--> $DIR/ex1-return-one-existing-name-if-else-2.rs:11:12 | ||
--> $DIR/ex1-return-one-existing-name-if-else-2.rs:12:16 | ||
| | ||
11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ||
| ^ consider changing the type of `x` to `&'a i32` | ||
| - consider changing the type of `x` to `&'a i32` | ||
12 | if x > y { x } else { y } | ||
| - lifetime `'a` required | ||
| ^ lifetime `'a` required | ||
|
||
error: aborting due to previous error(s) | ||
|
6 changes: 3 additions & 3 deletions
6
src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr
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,10 +1,10 @@ | ||
error[E0611]: explicit lifetime required in parameter type | ||
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:11:12 | ||
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:12:27 | ||
| | ||
11 | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 { | ||
| ^^^^^^ consider changing type to `(&'a i32, &'a i32)` | ||
| ------ consider changing type to `(&'a i32, &'a i32)` | ||
12 | if x > y { x } else { y } | ||
| - lifetime `'a` required | ||
| ^ lifetime `'a` required | ||
|
||
error: aborting due to previous error(s) | ||
|
6 changes: 3 additions & 3 deletions
6
src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
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,10 +1,10 @@ | ||
error[E0611]: explicit lifetime required in the type of `y` | ||
--> $DIR/ex1-return-one-existing-name-if-else.rs:11:24 | ||
--> $DIR/ex1-return-one-existing-name-if-else.rs:12:27 | ||
| | ||
11 | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { | ||
| ^ consider changing the type of `y` to `&'a i32` | ||
| - consider changing the type of `y` to `&'a i32` | ||
12 | if x > y { x } else { y } | ||
| - lifetime `'a` required | ||
| ^ lifetime `'a` required | ||
|
||
error: aborting due to previous error(s) | ||
|
6 changes: 3 additions & 3 deletions
6
src/test/ui/lifetime-errors/ex2a-push-one-existing-name-2.stderr
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,10 +1,10 @@ | ||
error[E0611]: explicit lifetime required in the type of `x` | ||
--> $DIR/ex2a-push-one-existing-name-2.rs:15:12 | ||
--> $DIR/ex2a-push-one-existing-name-2.rs:16:12 | ||
| | ||
15 | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) { | ||
| ^ consider changing the type of `x` to `Ref<'a, i32>` | ||
| - consider changing the type of `x` to `Ref<'a, i32>` | ||
16 | y.push(x); | ||
| - lifetime `'a` required | ||
| ^ lifetime `'a` required | ||
|
||
error: aborting due to previous error(s) | ||
|
6 changes: 3 additions & 3 deletions
6
src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr
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,10 +1,10 @@ | ||
error[E0611]: explicit lifetime required in the type of `y` | ||
--> $DIR/ex2a-push-one-existing-name.rs:15:39 | ||
--> $DIR/ex2a-push-one-existing-name.rs:16:12 | ||
| | ||
15 | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) { | ||
| ^ consider changing the type of `y` to `Ref<'a, i32>` | ||
| - consider changing the type of `y` to `Ref<'a, i32>` | ||
16 | x.push(y); | ||
| - lifetime `'a` required | ||
| ^ lifetime `'a` required | ||
|
||
error: aborting due to previous error(s) | ||
|