Skip to content

Commit ced6502

Browse files
committed
update error message
1 parent 4fcf43f commit ced6502

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_typeck/src/check/dropck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn ensure_drop_params_and_item_params_correspond<'tcx>(
8686
err.span_note(
8787
item_span,
8888
&format!(
89-
"use the same sequence of generic type, lifetime and const parameters \
89+
"use the same sequence of generic lifetime, type and const parameters \
9090
as the {self_descr} definition",
9191
),
9292
);

src/test/ui/dropck/issue-38868.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | | }
99
| |_^
1010
|
1111
= note: `i32` is not a generic parameter
12-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
12+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
1313
--> $DIR/issue-38868.rs:1:1
1414
|
1515
LL | / pub struct List<T> {

src/test/ui/dropck/reject-specialized-drops-8142.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LL | impl Drop for N<'static> { fn drop(&mut self) { } }
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030
|
3131
= note: `'static` is not a generic parameter
32-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
32+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
3333
--> $DIR/reject-specialized-drops-8142.rs:7:1
3434
|
3535
LL | struct N<'n> { x: &'n i8 }
@@ -42,7 +42,7 @@ LL | impl Drop for P<i8> { fn drop(&mut self) { } } // REJ
4242
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4343
|
4444
= note: `i8` is not a generic parameter
45-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
45+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
4646
--> $DIR/reject-specialized-drops-8142.rs:9:1
4747
|
4848
LL | struct P<Tp> { x: *const Tp }
@@ -79,7 +79,7 @@ LL | impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJ
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080
|
8181
= note: `One` is mentioned multiple times
82-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
82+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
8383
--> $DIR/reject-specialized-drops-8142.rs:15:1
8484
|
8585
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
9292
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9393
|
9494
= note: `'lw` is mentioned multiple times
95-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
95+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
9696
--> $DIR/reject-specialized-drops-8142.rs:16:1
9797
|
9898
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
105105
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106106
|
107107
= note: `3_usize` is not a generic parameter
108-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
108+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
109109
--> $DIR/reject-specialized-drops-8142.rs:17:1
110110
|
111111
LL | struct X<const Ca: usize>;
@@ -118,7 +118,7 @@ LL | impl<const Ca: usize> Drop for Y<Ca, Ca> { fn drop(&mut self) { } } //
118118
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119119
|
120120
= note: `Ca` is mentioned multiple times
121-
note: use the same sequence of generic type, lifetime and const parameters as the struct definition
121+
note: use the same sequence of generic lifetime, type and const parameters as the struct definition
122122
--> $DIR/reject-specialized-drops-8142.rs:18:1
123123
|
124124
LL | struct Y<const Ca: usize, const Cb: usize>;

0 commit comments

Comments
 (0)