about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-05-27 11:29:18 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-06-03 08:26:10 +0200
commitc75409d5e423d0ba21a44eb7c2bf11df6bcf6072 (patch)
treea47e38918ccd43f294def2fe42a224f10ddd120d /src/test
parenta265c49b252a932b06a94d5715013c8311989139 (diff)
downloadrust-c75409d5e423d0ba21a44eb7c2bf11df6bcf6072.tar.gz
rust-c75409d5e423d0ba21a44eb7c2bf11df6bcf6072.zip
Do not lower generic lifetime params when AST resolution emitted an error.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/regions/regions-name-duplicated.rs1
-rw-r--r--src/test/ui/regions/regions-name-duplicated.stderr13
2 files changed, 2 insertions, 12 deletions
diff --git a/src/test/ui/regions/regions-name-duplicated.rs b/src/test/ui/regions/regions-name-duplicated.rs
index ee9549991ce..4cf8b440192 100644
--- a/src/test/ui/regions/regions-name-duplicated.rs
+++ b/src/test/ui/regions/regions-name-duplicated.rs
@@ -1,6 +1,5 @@
 struct Foo<'a, 'a> {
     //~^ ERROR lifetime name `'a` declared twice
-    //~| ERROR parameter `'a` is never used [E0392]
     x: &'a isize,
 }
 
diff --git a/src/test/ui/regions/regions-name-duplicated.stderr b/src/test/ui/regions/regions-name-duplicated.stderr
index 6d6e28c8479..303aa338999 100644
--- a/src/test/ui/regions/regions-name-duplicated.stderr
+++ b/src/test/ui/regions/regions-name-duplicated.stderr
@@ -6,15 +6,6 @@ LL | struct Foo<'a, 'a> {
    |            |
    |            first declared here
 
-error[E0392]: parameter `'a` is never used
-  --> $DIR/regions-name-duplicated.rs:1:12
-   |
-LL | struct Foo<'a, 'a> {
-   |            ^^ unused parameter
-   |
-   = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0263, E0392.
-For more information about an error, try `rustc --explain E0263`.
+For more information about this error, try `rustc --explain E0263`.