about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-03-29 07:29:59 +0200
committerlcnr <rust@lcnr.de>2022-05-20 11:50:07 +0200
commitced65022dae81b46e629262d8458cc3e5ac8cec1 (patch)
tree113fda828b7d75e68d4083d0fc33bcd8115cfd8c
parent4fcf43f67cd5be83bbb72a1cbf76bdfc95d7c83b (diff)
downloadrust-ced65022dae81b46e629262d8458cc3e5ac8cec1.tar.gz
rust-ced65022dae81b46e629262d8458cc3e5ac8cec1.zip
update error message
-rw-r--r--compiler/rustc_typeck/src/check/dropck.rs2
-rw-r--r--src/test/ui/dropck/issue-38868.stderr2
-rw-r--r--src/test/ui/dropck/reject-specialized-drops-8142.stderr12
3 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_typeck/src/check/dropck.rs b/compiler/rustc_typeck/src/check/dropck.rs
index 0b0f7a085fc..41b895f3bbf 100644
--- a/compiler/rustc_typeck/src/check/dropck.rs
+++ b/compiler/rustc_typeck/src/check/dropck.rs
@@ -86,7 +86,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
     err.span_note(
         item_span,
         &format!(
-            "use the same sequence of generic type, lifetime and const parameters \
+            "use the same sequence of generic lifetime, type and const parameters \
                      as the {self_descr} definition",
         ),
     );
diff --git a/src/test/ui/dropck/issue-38868.stderr b/src/test/ui/dropck/issue-38868.stderr
index f369b74cf55..f267abc0bfa 100644
--- a/src/test/ui/dropck/issue-38868.stderr
+++ b/src/test/ui/dropck/issue-38868.stderr
@@ -9,7 +9,7 @@ LL | | }
    | |_^
    |
    = note: `i32` is not a generic parameter
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/issue-38868.rs:1:1
    |
 LL | / pub struct List<T> {
diff --git a/src/test/ui/dropck/reject-specialized-drops-8142.stderr b/src/test/ui/dropck/reject-specialized-drops-8142.stderr
index 82e95ea075d..7f50cf5ab15 100644
--- a/src/test/ui/dropck/reject-specialized-drops-8142.stderr
+++ b/src/test/ui/dropck/reject-specialized-drops-8142.stderr
@@ -29,7 +29,7 @@ LL | impl                    Drop for N<'static>     { fn drop(&mut self) { } }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `'static` is not a generic parameter
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:7:1
    |
 LL | struct N<'n> { x: &'n i8 }
@@ -42,7 +42,7 @@ LL | impl              Drop for P<i8>          { fn drop(&mut self) { } } // REJ
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `i8` is not a generic parameter
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:9:1
    |
 LL | struct P<Tp> { x: *const Tp }
@@ -79,7 +79,7 @@ LL | impl<One>         Drop for V<One,One>     { fn drop(&mut self) { } } // REJ
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `One` is mentioned multiple times
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:15:1
    |
 LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb }
@@ -92,7 +92,7 @@ LL | impl<'lw>         Drop for W<'lw,'lw>     { fn drop(&mut self) { } } // REJ
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `'lw` is mentioned multiple times
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:16:1
    |
 LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
@@ -105,7 +105,7 @@ LL | impl              Drop for X<3>           { fn drop(&mut self) { } } // REJ
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `3_usize` is not a generic parameter
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:17:1
    |
 LL | struct X<const Ca: usize>;
@@ -118,7 +118,7 @@ LL | impl<const Ca: usize> Drop for Y<Ca, Ca>     { fn drop(&mut self) { } } //
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `Ca` is mentioned multiple times
-note: use the same sequence of generic type, lifetime and const parameters as the struct definition
+note: use the same sequence of generic lifetime, type and const parameters as the struct definition
   --> $DIR/reject-specialized-drops-8142.rs:18:1
    |
 LL | struct Y<const Ca: usize, const Cb: usize>;