diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-02 20:46:40 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-03 08:26:10 +0200 |
| commit | 2aa9c703ce9ce9c69d466481b2fda3268db64f3e (patch) | |
| tree | dca99af1936f6818fa07d6a2a36b805025684aee /src | |
| parent | 86bd99060c5f2b60e27c6afa5ad9c904333cb746 (diff) | |
| download | rust-2aa9c703ce9ce9c69d466481b2fda3268db64f3e.tar.gz rust-2aa9c703ce9ce9c69d466481b2fda3268db64f3e.zip | |
Use the same message as type & const generics.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/error-codes/E0263.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0263.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/hygiene/duplicate_lifetimes.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/hygiene/duplicate_lifetimes.stderr | 14 | ||||
| -rw-r--r-- | src/test/ui/regions/regions-name-duplicated.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/regions/regions-name-duplicated.stderr | 8 |
6 files changed, 19 insertions, 19 deletions
diff --git a/src/test/ui/error-codes/E0263.rs b/src/test/ui/error-codes/E0263.rs index 4376437823c..92917678e4c 100644 --- a/src/test/ui/error-codes/E0263.rs +++ b/src/test/ui/error-codes/E0263.rs @@ -1,5 +1,5 @@ fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { - //~^ ERROR E0263 + //~^ ERROR E0403 } fn main() {} diff --git a/src/test/ui/error-codes/E0263.stderr b/src/test/ui/error-codes/E0263.stderr index 56e4ef02379..e3f9aea296a 100644 --- a/src/test/ui/error-codes/E0263.stderr +++ b/src/test/ui/error-codes/E0263.stderr @@ -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`. diff --git a/src/test/ui/hygiene/duplicate_lifetimes.rs b/src/test/ui/hygiene/duplicate_lifetimes.rs index e7312b51dbc..8971fb62626 100644 --- a/src/test/ui/hygiene/duplicate_lifetimes.rs +++ b/src/test/ui/hygiene/duplicate_lifetimes.rs @@ -5,12 +5,12 @@ #[rustc_macro_transparency = "semitransparent"] macro m($a:lifetime) { - fn g<$a, 'a>() {} //~ ERROR lifetime name `'a` declared twice + fn g<$a, 'a>() {} //~ ERROR the name `'a` is already used for a generic parameter } #[rustc_macro_transparency = "transparent"] macro n($a:lifetime) { - fn h<$a, 'a>() {} //~ ERROR lifetime name `'a` declared twice + fn h<$a, 'a>() {} //~ ERROR the name `'a` is already used for a generic parameter } m!('a); diff --git a/src/test/ui/hygiene/duplicate_lifetimes.stderr b/src/test/ui/hygiene/duplicate_lifetimes.stderr index ade411a2544..9f1a7514727 100644 --- a/src/test/ui/hygiene/duplicate_lifetimes.stderr +++ b/src/test/ui/hygiene/duplicate_lifetimes.stderr @@ -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`. diff --git a/src/test/ui/regions/regions-name-duplicated.rs b/src/test/ui/regions/regions-name-duplicated.rs index 4cf8b440192..f6616591a3d 100644 --- a/src/test/ui/regions/regions-name-duplicated.rs +++ b/src/test/ui/regions/regions-name-duplicated.rs @@ -1,5 +1,5 @@ struct Foo<'a, 'a> { - //~^ ERROR lifetime name `'a` declared twice + //~^ ERROR the name `'a` is already used for a generic parameter x: &'a isize, } diff --git a/src/test/ui/regions/regions-name-duplicated.stderr b/src/test/ui/regions/regions-name-duplicated.stderr index 303aa338999..cef73c18d37 100644 --- a/src/test/ui/regions/regions-name-duplicated.stderr +++ b/src/test/ui/regions/regions-name-duplicated.stderr @@ -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`. |
