From 696472a5867dafa35c5262da709677075fab9dc8 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Thu, 22 Sep 2022 01:28:45 +0200 Subject: [PATCH 1/2] Fix a typo in error message --- compiler/rustc_resolve/src/late/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index c3c9b0b56178..3c276a9ada97 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -173,7 +173,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> { span, span_label: match res { Res::Def(kind, def_id) if kind == DefKind::TyParam => { - self.def_span(def_id).map(|span| (span, "found this type pararmeter")) + self.def_span(def_id).map(|span| (span, "found this type parameter")) } _ => None, }, From 07767784ad667f4763e3ad6d7914849f3a43c65f Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Thu, 22 Sep 2022 01:32:37 +0200 Subject: [PATCH 2/2] Bless test output changes --- .../ui/const-generics/generic_const_exprs/issue-69654.stderr | 2 +- src/test/ui/lexical-scopes.stderr | 2 +- .../point-at-type-parameter-shadowing-another-type.stderr | 2 +- src/test/ui/span/issue-35987.stderr | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr b/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr index 5ad457d547a6..c3e2f8e1646f 100644 --- a/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr +++ b/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr @@ -4,7 +4,7 @@ error[E0423]: expected value, found type parameter `T` LL | impl Bar for [u8; T] {} | - ^ not a value | | - | found this type pararmeter + | found this type parameter error[E0599]: the function or associated item `foo` exists for struct `Foo<_>`, but its trait bounds were not satisfied --> $DIR/issue-69654.rs:17:10 diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index ad11f72a31d3..08e4be2c0c35 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -2,7 +2,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `T` --> $DIR/lexical-scopes.rs:3:13 | LL | fn f() { - | - found this type pararmeter + | - found this type parameter LL | let t = T { i: 0 }; | ^ not a struct, variant or union type diff --git a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr index d9c404e94acb..af9f4612ab34 100644 --- a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr +++ b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr @@ -2,7 +2,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `Baz` --> $DIR/point-at-type-parameter-shadowing-another-type.rs:16:13 | LL | impl Foo for Bar { - | --- found this type pararmeter + | --- found this type parameter ... LL | Baz { num } => num, | ^^^ not a struct, variant or union type diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index ea9c4c82c361..d8fddc8007f5 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -4,7 +4,7 @@ error[E0404]: expected trait, found type parameter `Add` LL | impl Add for Foo { | --- ^^^ not a trait | | - | found this type pararmeter + | found this type parameter | help: consider importing this trait instead |