-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the same message as type & const generics.
- Loading branch information
Showing
9 changed files
with
50 additions
and
71 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,5 +1,5 @@ | ||
fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { | ||
//~^ ERROR E0263 | ||
//~^ ERROR E0403 | ||
} | ||
|
||
fn main() {} |
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,11 +1,11 @@ | ||
error[E0263]: lifetime name `'a` declared twice in the same scope | ||
error[E0403]: the name `'a` is already used for a generic parameter in this item's generic parameters | ||
--> $DIR/E0263.rs:1:16 | ||
| | ||
LL | fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { | ||
| -- ^^ lifetime `'a` already in scope | ||
| -- ^^ already used | ||
| | | ||
| first declared here | ||
| first use of `'a` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0263`. | ||
For more information about this error, try `rustc --explain E0403`. |
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,31 +1,31 @@ | ||
error[E0263]: lifetime name `'a` declared twice in the same scope | ||
error[E0403]: the name `'a` is already used for a generic parameter in this item's generic parameters | ||
--> $DIR/duplicate_lifetimes.rs:8:14 | ||
| | ||
LL | fn g<$a, 'a>() {} | ||
| ^^ lifetime `'a` already in scope | ||
| ^^ already used | ||
... | ||
LL | m!('a); | ||
| ------ | ||
| | | | ||
| | first declared here | ||
| | first use of `'a` | ||
| in this macro invocation | ||
| | ||
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0263]: lifetime name `'a` declared twice in the same scope | ||
error[E0403]: the name `'a` is already used for a generic parameter in this item's generic parameters | ||
--> $DIR/duplicate_lifetimes.rs:13:14 | ||
| | ||
LL | fn h<$a, 'a>() {} | ||
| ^^ lifetime `'a` already in scope | ||
| ^^ already used | ||
... | ||
LL | n!('a); | ||
| ------ | ||
| | | | ||
| | first declared here | ||
| | first use of `'a` | ||
| in this macro invocation | ||
| | ||
= note: this error originates in the macro `n` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0263`. | ||
For more information about this error, try `rustc --explain E0403`. |
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,11 +1,11 @@ | ||
error[E0263]: lifetime name `'a` declared twice in the same scope | ||
error[E0403]: the name `'a` is already used for a generic parameter in this item's generic parameters | ||
--> $DIR/regions-name-duplicated.rs:1:16 | ||
| | ||
LL | struct Foo<'a, 'a> { | ||
| -- ^^ lifetime `'a` already in scope | ||
| -- ^^ already used | ||
| | | ||
| first declared here | ||
| first use of `'a` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0263`. | ||
For more information about this error, try `rustc --explain E0403`. |