From 726598ed9ad7d1566e5a6d915673a22b907c3552 Mon Sep 17 00:00:00 2001 From: ickk Date: Fri, 7 Apr 2023 17:42:17 +1000 Subject: [PATCH 1/2] fix infer_source_kind_subdiag_let help message - remove double "the" --- compiler/rustc_infer/messages.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_infer/messages.ftl b/compiler/rustc_infer/messages.ftl index 15780898dc6ab..1e43644be89ab 100644 --- a/compiler/rustc_infer/messages.ftl +++ b/compiler/rustc_infer/messages.ftl @@ -30,8 +30,8 @@ infer_source_kind_subdiag_let = {$kind -> }{$x_kind -> [has_name] , where the {$prefix_kind -> *[type] type for {$prefix} - [const_with_param] the value of const parameter - [const] the value of the constant + [const_with_param] value of const parameter + [const] value of the constant } `{$arg_name}` is specified [underscore] , where the placeholders `_` are specified *[empty] {""} From 30f458ed1e5d4997ee70cb2347edbea6683f8922 Mon Sep 17 00:00:00 2001 From: ickk Date: Fri, 7 Apr 2023 18:07:11 +1000 Subject: [PATCH 2/2] update tests/ui --- tests/ui/const-generics/defaults/doesnt_infer.stderr | 2 +- tests/ui/inference/issue-83606.stderr | 2 +- tests/ui/issues/issue-98299.stderr | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ui/const-generics/defaults/doesnt_infer.stderr b/tests/ui/const-generics/defaults/doesnt_infer.stderr index 227b2f4022365..a61411d6eb6e7 100644 --- a/tests/ui/const-generics/defaults/doesnt_infer.stderr +++ b/tests/ui/const-generics/defaults/doesnt_infer.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed for `Foo` LL | let foo = Foo::foo(); | ^^^ | -help: consider giving `foo` an explicit type, where the the value of const parameter `N` is specified +help: consider giving `foo` an explicit type, where the value of const parameter `N` is specified | LL | let foo: Foo = Foo::foo(); | ++++++++ diff --git a/tests/ui/inference/issue-83606.stderr b/tests/ui/inference/issue-83606.stderr index f2ee8692e38a6..97ed53fb3ce56 100644 --- a/tests/ui/inference/issue-83606.stderr +++ b/tests/ui/inference/issue-83606.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed for `[usize; N]` LL | let _ = foo("foo"); | ^ | -help: consider giving this pattern a type, where the the value of const parameter `N` is specified +help: consider giving this pattern a type, where the value of const parameter `N` is specified | LL | let _: [usize; N] = foo("foo"); | ++++++++++++ diff --git a/tests/ui/issues/issue-98299.stderr b/tests/ui/issues/issue-98299.stderr index fd905392a21ad..4fd9f3030fc55 100644 --- a/tests/ui/issues/issue-98299.stderr +++ b/tests/ui/issues/issue-98299.stderr @@ -4,7 +4,7 @@ error[E0282]: type annotations needed for `SmallCString` LL | SmallCString::try_from(p).map(|cstr| cstr); | ^^^^ | -help: consider giving this closure parameter an explicit type, where the the value of const parameter `N` is specified +help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified | LL | SmallCString::try_from(p).map(|cstr: SmallCString| cstr); | +++++++++++++++++