update error message

This commit is contained in:
lcnr 2022-03-29 07:29:59 +02:00
parent 4fcf43f67c
commit ced65022da
3 changed files with 8 additions and 8 deletions

View File

@ -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",
),
);

View File

@ -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> {

View File

@ -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>;