From 196a30ebff0156240b3297f9859fb57fe725c081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Wed, 1 Jun 2022 13:04:35 -0700 Subject: [PATCH] Fix typo --- compiler/rustc_typeck/src/astconv/mod.rs | 2 +- src/test/ui/structs/struct-path-self.stderr | 4 ++-- .../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 @@ pub fn res_to_ty( 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:: {}; @@ -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:: {}; 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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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 { TSVariant(T), SVariant { v: T }, UVariant } | ^^^^ `Self` corresponds to this type ... LL | impl Enum { - | --------------- `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::<()>;