diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-06-01 13:04:35 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-06-01 13:04:35 -0700 |
| commit | 196a30ebff0156240b3297f9859fb57fe725c081 (patch) | |
| tree | 7cfbaf8d9ac80ee39d8cf9e5bd4ce8c065281dfc | |
| parent | 3d60691996af1cc19723f06f180e0bc8d9b750ed (diff) | |
| download | rust-196a30ebff0156240b3297f9859fb57fe725c081.tar.gz rust-196a30ebff0156240b3297f9859fb57fe725c081.zip | |
Fix typo
| -rw-r--r-- | compiler/rustc_typeck/src/astconv/mod.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/structs/struct-path-self.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs index 4555e31016f..7efec3f51f7 100644 --- a/compiler/rustc_typeck/src/astconv/mod.rs +++ b/compiler/rustc_typeck/src/astconv/mod.rs @@ -2417,7 +2417,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let mut span: MultiSpan = vec![t_sp].into(); span.push_span_label( i_sp, - &format!("`Self` is or type `{type_name}` in this `impl`"), + &format!("`Self` is on type `{type_name}` in this `impl`"), ); let mut postfix = ""; if generics == 0 { diff --git a/src/test/ui/structs/struct-path-self.stderr b/src/test/ui/structs/struct-path-self.stderr index bf9fe72d718..37384e56bc9 100644 --- a/src/test/ui/structs/struct-path-self.stderr +++ b/src/test/ui/structs/struct-path-self.stderr @@ -41,7 +41,7 @@ LL | struct S; | ^ `Self` corresponds to this type, which doesn't have type parameters ... LL | impl Tr for S { - | ------------- `Self` is or type `S` in this `impl` + | ------------- `Self` is on type `S` in this `impl` help: the `Self` type doesn't accept type parameters | LL - let z = Self::<u8> {}; @@ -61,7 +61,7 @@ LL | struct S; | ^ `Self` corresponds to this type, which doesn't have type parameters ... LL | impl S { - | ------ `Self` is or type `S` in this `impl` + | ------ `Self` is on type `S` in this `impl` help: the `Self` type doesn't accept type parameters | LL - let z = Self::<u8> {}; diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr index 98c164ff418..b1b0ec99999 100644 --- a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr +++ b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr @@ -36,7 +36,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::TSVariant(()); @@ -74,7 +74,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::TSVariant::<()>(()); @@ -136,7 +136,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::SVariant { v: () }; @@ -167,7 +167,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::SVariant::<()> { v: () }; @@ -217,7 +217,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::UVariant; @@ -236,7 +236,7 @@ LL | enum Enum<T> { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl<T> Enum<T> { - | --------------- `Self` is or type `Enum` in this `impl` + | --------------- `Self` is on type `Enum` in this `impl` 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 | LL | Enum::<()>::UVariant::<()>; |
