Skip to content

Commit 196a30e

Browse files
committed
Fix typo
1 parent 3d60691 commit 196a30e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

compiler/rustc_typeck/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
24172417
let mut span: MultiSpan = vec![t_sp].into();
24182418
span.push_span_label(
24192419
i_sp,
2420-
&format!("`Self` is or type `{type_name}` in this `impl`"),
2420+
&format!("`Self` is on type `{type_name}` in this `impl`"),
24212421
);
24222422
let mut postfix = "";
24232423
if generics == 0 {

src/test/ui/structs/struct-path-self.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ LL | struct S;
4141
| ^ `Self` corresponds to this type, which doesn't have type parameters
4242
...
4343
LL | impl Tr for S {
44-
| ------------- `Self` is or type `S` in this `impl`
44+
| ------------- `Self` is on type `S` in this `impl`
4545
help: the `Self` type doesn't accept type parameters
4646
|
4747
LL - let z = Self::<u8> {};
@@ -61,7 +61,7 @@ LL | struct S;
6161
| ^ `Self` corresponds to this type, which doesn't have type parameters
6262
...
6363
LL | impl S {
64-
| ------ `Self` is or type `S` in this `impl`
64+
| ------ `Self` is on type `S` in this `impl`
6565
help: the `Self` type doesn't accept type parameters
6666
|
6767
LL - let z = Self::<u8> {};

src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
3636
| ^^^^ `Self` corresponds to this type
3737
...
3838
LL | impl<T> Enum<T> {
39-
| --------------- `Self` is or type `Enum` in this `impl`
39+
| --------------- `Self` is on type `Enum` in this `impl`
4040
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
4141
|
4242
LL | Enum::<()>::TSVariant(());
@@ -74,7 +74,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
7474
| ^^^^ `Self` corresponds to this type
7575
...
7676
LL | impl<T> Enum<T> {
77-
| --------------- `Self` is or type `Enum` in this `impl`
77+
| --------------- `Self` is on type `Enum` in this `impl`
7878
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
7979
|
8080
LL | Enum::<()>::TSVariant::<()>(());
@@ -136,7 +136,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
136136
| ^^^^ `Self` corresponds to this type
137137
...
138138
LL | impl<T> Enum<T> {
139-
| --------------- `Self` is or type `Enum` in this `impl`
139+
| --------------- `Self` is on type `Enum` in this `impl`
140140
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
141141
|
142142
LL | Enum::<()>::SVariant { v: () };
@@ -167,7 +167,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
167167
| ^^^^ `Self` corresponds to this type
168168
...
169169
LL | impl<T> Enum<T> {
170-
| --------------- `Self` is or type `Enum` in this `impl`
170+
| --------------- `Self` is on type `Enum` in this `impl`
171171
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
172172
|
173173
LL | Enum::<()>::SVariant::<()> { v: () };
@@ -217,7 +217,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
217217
| ^^^^ `Self` corresponds to this type
218218
...
219219
LL | impl<T> Enum<T> {
220-
| --------------- `Self` is or type `Enum` in this `impl`
220+
| --------------- `Self` is on type `Enum` in this `impl`
221221
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
222222
|
223223
LL | Enum::<()>::UVariant;
@@ -236,7 +236,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant }
236236
| ^^^^ `Self` corresponds to this type
237237
...
238238
LL | impl<T> Enum<T> {
239-
| --------------- `Self` is or type `Enum` in this `impl`
239+
| --------------- `Self` is on type `Enum` in this `impl`
240240
help: the `Self` type doesn't accept type parameters, use the concrete type's name `Enum` instead if you want to specify its type parameters
241241
|
242242
LL | Enum::<()>::UVariant::<()>;

0 commit comments

Comments
 (0)