From a5b639dc012e735bd6888a1e513bd925a7e101ba Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 23 Feb 2023 10:27:06 -0700 Subject: [PATCH] diagnostics: remove inconsistent English article "this" from E0107 Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`, the error message where it gives additional notes about where the associated type is defined, and how the dead code lint doesn't have an article, like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have articles, so it seems unnecessary to have one here. --- .../wrong_number_of_generic_args.rs | 2 +- .../argument-suggestions/issue-100154.stderr | 2 +- tests/ui/async-await/issues/issue-65159.rs | 2 +- .../ui/async-await/issues/issue-65159.stderr | 2 +- .../issue-82126-mismatched-subst-and-hir.rs | 4 +- ...ssue-82126-mismatched-subst-and-hir.stderr | 4 +- .../generic_const_exprs/issue-102768.rs | 4 +- .../generic_const_exprs/issue-102768.stderr | 4 +- .../generic_const_exprs/issue-76595.stderr | 2 +- .../incorrect-number-of-const-args.stderr | 4 +- .../invalid-const-arg-for-type-param.rs | 4 +- .../invalid-const-arg-for-type-param.stderr | 4 +- .../invalid-constant-in-args.rs | 2 +- .../invalid-constant-in-args.stderr | 2 +- tests/ui/const-generics/issues/issue-87493.rs | 2 +- .../const-generics/issues/issue-87493.stderr | 2 +- .../issue-89013-no-kw.rs | 2 +- .../issue-89013-no-kw.stderr | 2 +- .../parser-error-recovery/issue-89013.rs | 2 +- .../parser-error-recovery/issue-89013.stderr | 2 +- tests/ui/constructor-lifetime-args.rs | 8 +- tests/ui/constructor-lifetime-args.stderr | 8 +- tests/ui/error-codes/E0107.rs | 20 ++-- tests/ui/error-codes/E0107.stderr | 20 ++-- .../gat-trait-path-parenthesised-args.rs | 6 +- .../gat-trait-path-parenthesised-args.stderr | 6 +- .../missing_lifetime_args.rs | 4 +- .../missing_lifetime_args.stderr | 4 +- .../missing_lifetime_const.rs | 2 +- .../missing_lifetime_const.stderr | 2 +- .../parameter_number_and_kind.rs | 6 +- .../parameter_number_and_kind.stderr | 6 +- .../trait-path-type-error-once-implemented.rs | 4 +- ...it-path-type-error-once-implemented.stderr | 4 +- tests/ui/generics/bad-mid-path-type-params.rs | 10 +- .../generics/bad-mid-path-type-params.stderr | 10 +- .../generics/generic-arg-mismatch-recover.rs | 6 +- .../generic-arg-mismatch-recover.stderr | 6 +- .../generic-impl-less-params-with-defaults.rs | 2 +- ...eric-impl-less-params-with-defaults.stderr | 2 +- .../generic-impl-more-params-with-defaults.rs | 2 +- ...eric-impl-more-params-with-defaults.stderr | 2 +- .../generic-type-more-params-with-defaults.rs | 2 +- ...eric-type-more-params-with-defaults.stderr | 2 +- tests/ui/generics/wrong-number-of-args.rs | 106 +++++++++--------- tests/ui/generics/wrong-number-of-args.stderr | 106 +++++++++--------- .../explicit-generic-args-for-impl.stderr | 2 +- .../not-enough-args.stderr | 2 +- tests/ui/issues/issue-18423.rs | 2 +- tests/ui/issues/issue-18423.stderr | 2 +- tests/ui/issues/issue-3214.rs | 2 +- tests/ui/issues/issue-3214.stderr | 2 +- tests/ui/issues/issue-53251.rs | 4 +- tests/ui/issues/issue-53251.stderr | 4 +- tests/ui/issues/issue-60622.rs | 2 +- tests/ui/issues/issue-60622.stderr | 2 +- .../mismatched_arg_count.rs | 2 +- .../mismatched_arg_count.stderr | 2 +- .../methods/method-call-lifetime-args-fail.rs | 8 +- .../method-call-lifetime-args-fail.stderr | 8 +- tests/ui/seq-args.rs | 4 +- tests/ui/seq-args.stderr | 4 +- .../ui/structs/struct-path-associated-type.rs | 4 +- .../struct-path-associated-type.stderr | 4 +- .../structure-constructor-type-mismatch.rs | 4 +- ...structure-constructor-type-mismatch.stderr | 4 +- tests/ui/suggestions/issue-101421.rs | 2 +- tests/ui/suggestions/issue-101421.stderr | 2 +- tests/ui/suggestions/issue-104287.rs | 2 +- tests/ui/suggestions/issue-104287.stderr | 2 +- tests/ui/suggestions/issue-85347.rs | 2 +- tests/ui/suggestions/issue-85347.stderr | 2 +- tests/ui/suggestions/issue-89064.stderr | 8 +- .../suggestions/missing-lifetime-specifier.rs | 20 ++-- .../missing-lifetime-specifier.stderr | 20 ++-- .../missing-type-param-used-in-param.stderr | 2 +- ...-generic-to-trait-in-method-with-params.rs | 2 +- ...eric-to-trait-in-method-with-params.stderr | 2 +- ...-ascription-instead-of-path-in-type.stderr | 2 +- ...use-type-argument-instead-of-assoc-type.rs | 2 +- ...type-argument-instead-of-assoc-type.stderr | 2 +- tests/ui/traits/object/vs-lifetime.rs | 4 +- tests/ui/traits/object/vs-lifetime.stderr | 4 +- tests/ui/traits/test-2.rs | 4 +- tests/ui/traits/test-2.stderr | 4 +- tests/ui/transmutability/issue-101739-2.rs | 2 +- .../ui/transmutability/issue-101739-2.stderr | 2 +- .../enum-variant-generic-args.rs | 12 +- .../enum-variant-generic-args.stderr | 12 +- tests/ui/typeck/issue-75883.rs | 4 +- tests/ui/typeck/issue-75883.stderr | 4 +- .../typeck-builtin-bound-type-parameters.rs | 12 +- ...ypeck-builtin-bound-type-parameters.stderr | 12 +- .../typeck_type_placeholder_lifetime_1.rs | 2 +- .../typeck_type_placeholder_lifetime_1.stderr | 2 +- .../typeck_type_placeholder_lifetime_2.rs | 2 +- .../typeck_type_placeholder_lifetime_2.stderr | 2 +- tests/ui/ufcs/ufcs-qpath-missing-params.rs | 2 +- .../ui/ufcs/ufcs-qpath-missing-params.stderr | 2 +- .../unboxed-closure-sugar-region.rs | 2 +- .../unboxed-closure-sugar-region.stderr | 2 +- .../unboxed-closure-sugar-used-on-struct-1.rs | 2 +- ...oxed-closure-sugar-used-on-struct-1.stderr | 2 +- .../unboxed-closure-sugar-used-on-struct.rs | 2 +- ...nboxed-closure-sugar-used-on-struct.stderr | 2 +- ...r-wrong-number-number-type-parameters-3.rs | 2 +- ...ong-number-number-type-parameters-3.stderr | 2 +- ...gar-wrong-number-number-type-parameters.rs | 10 +- ...wrong-number-number-type-parameters.stderr | 10 +- .../unboxed-closure-sugar-wrong-trait.rs | 2 +- .../unboxed-closure-sugar-wrong-trait.stderr | 2 +- 111 files changed, 339 insertions(+), 339 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs index 2cb0d430ee3..cae884ae8fb 100644 --- a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs @@ -462,7 +462,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { if self.gen_args.span_ext().is_some() { format!( - "this {} takes {}{} {} argument{} but {} {} supplied", + "{} takes {}{} {} argument{} but {} {} supplied", def_kind, quantifier, bound, diff --git a/tests/ui/argument-suggestions/issue-100154.stderr b/tests/ui/argument-suggestions/issue-100154.stderr index 1499229c3ce..2504f616fb7 100644 --- a/tests/ui/argument-suggestions/issue-100154.stderr +++ b/tests/ui/argument-suggestions/issue-100154.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-100154.rs:4:5 | LL | foo::<()>(()); diff --git a/tests/ui/async-await/issues/issue-65159.rs b/tests/ui/async-await/issues/issue-65159.rs index df2ca025705..6e547508bd4 100644 --- a/tests/ui/async-await/issues/issue-65159.rs +++ b/tests/ui/async-await/issues/issue-65159.rs @@ -3,7 +3,7 @@ // edition:2018 async fn copy() -> Result<()> -//~^ ERROR this enum takes 2 generic arguments +//~^ ERROR enum takes 2 generic arguments { Ok(()) } diff --git a/tests/ui/async-await/issues/issue-65159.stderr b/tests/ui/async-await/issues/issue-65159.stderr index 40c0e72b203..b8741333c32 100644 --- a/tests/ui/async-await/issues/issue-65159.stderr +++ b/tests/ui/async-await/issues/issue-65159.stderr @@ -1,4 +1,4 @@ -error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/issue-65159.rs:5:20 | LL | async fn copy() -> Result<()> diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs index dd0320bc53b..d067ff44704 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs @@ -14,8 +14,8 @@ impl MarketMultiplier { } async fn buy_lock(generator: &Mutex) -> LockedMarket<'_> { - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied - //~^^ ERROR this struct takes 1 generic argument but 0 generic arguments were supplied + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^^ ERROR struct takes 1 generic argument but 0 generic arguments were supplied LockedMarket(generator.lock().unwrap().buy()) } diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr index d2b927fb664..73e0aaf1e45 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 | LL | async fn buy_lock(generator: &Mutex) -> LockedMarket<'_> { @@ -12,7 +12,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct LockedMarket(T); | ^^^^^^^^^^^^ -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 | LL | async fn buy_lock(generator: &Mutex) -> LockedMarket<'_> { diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.rs b/tests/ui/const-generics/generic_const_exprs/issue-102768.rs index 7aea0d30d1a..18a9b53cf76 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102768.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.rs @@ -7,8 +7,8 @@ trait X { const _: () = { fn f2<'a>(arg: Box = &'a ()>>) {} - //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments - //~| ERROR this associated type takes 0 generic arguments but 1 generic argument + //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments + //~| ERROR associated type takes 0 generic arguments but 1 generic argument }; fn main() {} diff --git a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr index 8278edabe3a..175d54e4184 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/issue-102768.rs:9:30 | LL | fn f2<'a>(arg: Box = &'a ()>>) {} @@ -14,7 +14,7 @@ help: add missing lifetime argument LL | fn f2<'a>(arg: Box = &'a ()>>) {} | +++ -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-102768.rs:9:30 | LL | fn f2<'a>(arg: Box = &'a ()>>) {} diff --git a/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr b/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr index c587a7e153f..302da59651c 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-76595.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied --> $DIR/issue-76595.rs:15:5 | LL | test::<2>(); diff --git a/tests/ui/const-generics/incorrect-number-of-const-args.stderr b/tests/ui/const-generics/incorrect-number-of-const-args.stderr index a845454f762..01ac4e69a05 100644 --- a/tests/ui/const-generics/incorrect-number-of-const-args.stderr +++ b/tests/ui/const-generics/incorrect-number-of-const-args.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied --> $DIR/incorrect-number-of-const-args.rs:6:5 | LL | foo::<0>(); @@ -16,7 +16,7 @@ help: add missing generic argument LL | foo::<0, Y>(); | +++ -error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied +error[E0107]: function takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/incorrect-number-of-const-args.rs:9:5 | LL | foo::<0, 0, 0>(); diff --git a/tests/ui/const-generics/invalid-const-arg-for-type-param.rs b/tests/ui/const-generics/invalid-const-arg-for-type-param.rs index cdc54b214a8..bf10f471dc5 100644 --- a/tests/ui/const-generics/invalid-const-arg-for-type-param.rs +++ b/tests/ui/const-generics/invalid-const-arg-for-type-param.rs @@ -4,11 +4,11 @@ struct S; fn main() { let _: u32 = 5i32.try_into::<32>().unwrap(); - //~^ ERROR this method takes + //~^ ERROR method takes S.f::<0>(); //~^ ERROR no method named `f` S::<0>; - //~^ ERROR this struct takes 0 + //~^ ERROR struct takes 0 } diff --git a/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr b/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr index a9754bc46d7..4a649d8a7e8 100644 --- a/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr +++ b/tests/ui/const-generics/invalid-const-arg-for-type-param.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/invalid-const-arg-for-type-param.rs:6:23 | LL | let _: u32 = 5i32.try_into::<32>().unwrap(); @@ -23,7 +23,7 @@ LL | struct S; LL | S.f::<0>(); | ^ method not found in `S` -error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/invalid-const-arg-for-type-param.rs:12:5 | LL | S::<0>; diff --git a/tests/ui/const-generics/invalid-constant-in-args.rs b/tests/ui/const-generics/invalid-constant-in-args.rs index 7419d4a25ce..fd259197d29 100644 --- a/tests/ui/const-generics/invalid-constant-in-args.rs +++ b/tests/ui/const-generics/invalid-constant-in-args.rs @@ -2,5 +2,5 @@ use std::cell::Cell; fn main() { let _: Cell<&str, "a"> = Cell::new(""); - //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied + //~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied } diff --git a/tests/ui/const-generics/invalid-constant-in-args.stderr b/tests/ui/const-generics/invalid-constant-in-args.stderr index 993b63518e4..2545cc6f396 100644 --- a/tests/ui/const-generics/invalid-constant-in-args.stderr +++ b/tests/ui/const-generics/invalid-constant-in-args.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> $DIR/invalid-constant-in-args.rs:4:12 | LL | let _: Cell<&str, "a"> = Cell::new(""); diff --git a/tests/ui/const-generics/issues/issue-87493.rs b/tests/ui/const-generics/issues/issue-87493.rs index d8599ab22a3..80472e6bd9c 100644 --- a/tests/ui/const-generics/issues/issue-87493.rs +++ b/tests/ui/const-generics/issues/issue-87493.rs @@ -7,7 +7,7 @@ where S: MyTrait, T: MyTrait, //~^ ERROR: expected one of `,` or `>`, found `==` - //~| ERROR: this trait takes 0 generic arguments but 1 generic argument was supplied + //~| ERROR: trait takes 0 generic arguments but 1 generic argument was supplied { } diff --git a/tests/ui/const-generics/issues/issue-87493.stderr b/tests/ui/const-generics/issues/issue-87493.stderr index 653afae2191..73bd6ed73e6 100644 --- a/tests/ui/const-generics/issues/issue-87493.stderr +++ b/tests/ui/const-generics/issues/issue-87493.stderr @@ -9,7 +9,7 @@ help: if you meant to use an associated type binding, replace `==` with `=` LL | T: MyTrait, | ~ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-87493.rs:8:8 | LL | T: MyTrait, diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.rs b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.rs index b126b24853f..79743abe409 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.rs +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.rs @@ -7,7 +7,7 @@ struct Bar; const T: usize = 42; impl Foo for Bar { -//~^ ERROR this trait takes 1 generic argument but 0 generic arguments were supplied +//~^ ERROR trait takes 1 generic argument but 0 generic arguments were supplied //~| ERROR associated type bindings are not allowed here //~| ERROR associated const equality is incomplete fn do_x(&self) -> [u8; 3] { diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr index acfdde8e1a0..4f4e1aa3a04 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr @@ -7,7 +7,7 @@ LL | impl Foo for Bar { = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/issue-89013-no-kw.rs:9:6 | LL | impl Foo for Bar { diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013.rs b/tests/ui/const-generics/parser-error-recovery/issue-89013.rs index 9431779faf8..335d0d94e83 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013.rs +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013.rs @@ -8,7 +8,7 @@ const T: usize = 42; impl Foo for Bar { //~^ ERROR expected lifetime, type, or constant, found keyword `const` -//~| ERROR this trait takes 1 generic +//~| ERROR trait takes 1 generic //~| ERROR associated type bindings are not allowed here //~| ERROR associated const equality is incomplete fn do_x(&self) -> [u8; 3] { diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr index 583749a8573..3d2b98feb39 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr @@ -19,7 +19,7 @@ LL | impl Foo for Bar { = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/issue-89013.rs:9:6 | LL | impl Foo for Bar { diff --git a/tests/ui/constructor-lifetime-args.rs b/tests/ui/constructor-lifetime-args.rs index a824a44c9c2..f5802e7d8b1 100644 --- a/tests/ui/constructor-lifetime-args.rs +++ b/tests/ui/constructor-lifetime-args.rs @@ -15,12 +15,12 @@ enum E<'a, 'b> { fn main() { S(&0, &0); // OK S::<'static>(&0, &0); - //~^ ERROR this struct takes 2 lifetime arguments + //~^ ERROR struct takes 2 lifetime arguments S::<'static, 'static, 'static>(&0, &0); - //~^ ERROR this struct takes 2 lifetime arguments + //~^ ERROR struct takes 2 lifetime arguments E::V(&0); // OK E::V::<'static>(&0); - //~^ ERROR this enum takes 2 lifetime arguments + //~^ ERROR enum takes 2 lifetime arguments E::V::<'static, 'static, 'static>(&0); - //~^ ERROR this enum takes 2 lifetime arguments + //~^ ERROR enum takes 2 lifetime arguments } diff --git a/tests/ui/constructor-lifetime-args.stderr b/tests/ui/constructor-lifetime-args.stderr index bc1141b16c5..a18123fe19c 100644 --- a/tests/ui/constructor-lifetime-args.stderr +++ b/tests/ui/constructor-lifetime-args.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/constructor-lifetime-args.rs:17:5 | LL | S::<'static>(&0, &0); @@ -16,7 +16,7 @@ help: add missing lifetime argument LL | S::<'static, 'static>(&0, &0); | +++++++++ -error[E0107]: this struct takes 2 lifetime arguments but 3 lifetime arguments were supplied +error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/constructor-lifetime-args.rs:19:5 | LL | S::<'static, 'static, 'static>(&0, &0); @@ -30,7 +30,7 @@ note: struct defined here, with 2 lifetime parameters: `'a`, `'b` LL | struct S<'a, 'b>(&'a u8, &'b u8); | ^ -- -- -error[E0107]: this enum takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/constructor-lifetime-args.rs:22:8 | LL | E::V::<'static>(&0); @@ -48,7 +48,7 @@ help: add missing lifetime argument LL | E::V::<'static, 'static>(&0); | +++++++++ -error[E0107]: this enum takes 2 lifetime arguments but 3 lifetime arguments were supplied +error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/constructor-lifetime-args.rs:24:8 | LL | E::V::<'static, 'static, 'static>(&0); diff --git a/tests/ui/error-codes/E0107.rs b/tests/ui/error-codes/E0107.rs index d369fc2a565..fd23e7c00f2 100644 --- a/tests/ui/error-codes/E0107.rs +++ b/tests/ui/error-codes/E0107.rs @@ -11,39 +11,39 @@ enum Bar { struct Baz<'a, 'b, 'c> { buzz: Buzz<'a>, - //~^ ERROR this struct takes 2 lifetime arguments + //~^ ERROR struct takes 2 lifetime arguments //~| HELP add missing lifetime argument bar: Bar<'a>, - //~^ ERROR this enum takes 0 lifetime arguments + //~^ ERROR enum takes 0 lifetime arguments //~| HELP remove these generics foo2: Foo<'a, 'b, 'c>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove these lifetime arguments qux1: Qux<'a, 'b, i32>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove this lifetime argument qux2: Qux<'a, i32, 'b>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove this lifetime argument qux3: Qux<'a, 'b, 'c, i32>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove these lifetime arguments qux4: Qux<'a, i32, 'b, 'c>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove these lifetime arguments qux5: Qux<'a, 'b, i32, 'c>, - //~^ ERROR this struct takes 1 lifetime argument + //~^ ERROR struct takes 1 lifetime argument //~| HELP remove this lifetime argument quux: Quux<'a, i32, 'b>, - //~^ ERROR this struct takes 0 lifetime arguments + //~^ ERROR struct takes 0 lifetime arguments //~| HELP remove this lifetime argument } @@ -53,7 +53,7 @@ pub trait T { } fn trait_bound_generic>(_i: I) { - //~^ ERROR this trait takes 0 generic arguments + //~^ ERROR trait takes 0 generic arguments //~| HELP replace the generic bounds with the associated types } diff --git a/tests/ui/error-codes/E0107.stderr b/tests/ui/error-codes/E0107.stderr index 03430f8fa3a..3f540eb08bc 100644 --- a/tests/ui/error-codes/E0107.stderr +++ b/tests/ui/error-codes/E0107.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/E0107.rs:13:11 | LL | buzz: Buzz<'a>, @@ -16,7 +16,7 @@ help: add missing lifetime argument LL | buzz: Buzz<'a, 'a>, | ++++ -error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/E0107.rs:17:10 | LL | bar: Bar<'a>, @@ -30,7 +30,7 @@ note: enum defined here, with 0 lifetime parameters LL | enum Bar { | ^^^ -error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied --> $DIR/E0107.rs:21:11 | LL | foo2: Foo<'a, 'b, 'c>, @@ -44,7 +44,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Foo<'a>(&'a str); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/E0107.rs:25:11 | LL | qux1: Qux<'a, 'b, i32>, @@ -58,7 +58,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Qux<'a, T>(&'a T); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/E0107.rs:29:11 | LL | qux2: Qux<'a, i32, 'b>, @@ -72,7 +72,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Qux<'a, T>(&'a T); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied --> $DIR/E0107.rs:33:11 | LL | qux3: Qux<'a, 'b, 'c, i32>, @@ -86,7 +86,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Qux<'a, T>(&'a T); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied --> $DIR/E0107.rs:37:11 | LL | qux4: Qux<'a, i32, 'b, 'c>, @@ -100,7 +100,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Qux<'a, T>(&'a T); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied --> $DIR/E0107.rs:41:11 | LL | qux5: Qux<'a, 'b, i32, 'c>, @@ -114,7 +114,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Qux<'a, T>(&'a T); | ^^^ -- -error[E0107]: this struct takes 0 lifetime arguments but 2 lifetime arguments were supplied +error[E0107]: struct takes 0 lifetime arguments but 2 lifetime arguments were supplied --> $DIR/E0107.rs:45:11 | LL | quux: Quux<'a, i32, 'b>, @@ -128,7 +128,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct Quux(T); | ^^^^ -error[E0107]: this trait takes 0 generic arguments but 2 generic arguments were supplied +error[E0107]: trait takes 0 generic arguments but 2 generic arguments were supplied --> $DIR/E0107.rs:55:27 | LL | fn trait_bound_generic>(_i: I) { diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs index 9eb069637c6..5738dfa83ee 100644 --- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs +++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs @@ -5,12 +5,12 @@ trait X { fn foo<'a>(arg: Box>) {} //~^ ERROR: lifetime in trait object type must be followed by `+` //~| ERROR: parenthesized generic arguments cannot be used - //~| ERROR this associated type takes 0 generic arguments but 1 generic argument - //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments + //~| ERROR associated type takes 0 generic arguments but 1 generic argument + //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments fn bar<'a>(arg: Box>) {} //~^ ERROR: parenthesized generic arguments cannot be used - //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments + //~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments fn main() {} diff --git a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr index 165779796e0..461853379b5 100644 --- a/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr +++ b/tests/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr @@ -23,7 +23,7 @@ LL | fn bar<'a>(arg: Box>) {} | | | help: remove these parentheses -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/gat-trait-path-parenthesised-args.rs:5:27 | LL | fn foo<'a>(arg: Box>) {} @@ -39,7 +39,7 @@ help: add missing lifetime argument LL | fn foo<'a>(arg: Box>) {} | +++ -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/gat-trait-path-parenthesised-args.rs:5:27 | LL | fn foo<'a>(arg: Box>) {} @@ -53,7 +53,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/gat-trait-path-parenthesised-args.rs:12:27 | LL | fn bar<'a>(arg: Box>) {} diff --git a/tests/ui/generic-associated-types/missing_lifetime_args.rs b/tests/ui/generic-associated-types/missing_lifetime_args.rs index 78def80925a..331511ba61a 100644 --- a/tests/ui/generic-associated-types/missing_lifetime_args.rs +++ b/tests/ui/generic-associated-types/missing_lifetime_args.rs @@ -12,9 +12,9 @@ fn foo<'c, 'd>(_arg: Box>) {} //~^ ERROR missing generics for associated type fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {} -//~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime +//~^ ERROR struct takes 3 lifetime arguments but 2 lifetime fn f<'a>(_arg: Foo<'a>) {} -//~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime +//~^ ERROR struct takes 3 lifetime arguments but 1 lifetime fn main() {} diff --git a/tests/ui/generic-associated-types/missing_lifetime_args.stderr b/tests/ui/generic-associated-types/missing_lifetime_args.stderr index 8f74b12c008..1a7a2e787a1 100644 --- a/tests/ui/generic-associated-types/missing_lifetime_args.stderr +++ b/tests/ui/generic-associated-types/missing_lifetime_args.stderr @@ -14,7 +14,7 @@ help: add missing lifetime arguments LL | fn foo<'c, 'd>(_arg: Box = (&'c u32, &'d u32)>>) {} | ++++++++ -error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied +error[E0107]: struct takes 3 lifetime arguments but 2 lifetime arguments were supplied --> $DIR/missing_lifetime_args.rs:14:26 | LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {} @@ -32,7 +32,7 @@ help: add missing lifetime argument LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {} | ++++ -error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 3 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing_lifetime_args.rs:17:16 | LL | fn f<'a>(_arg: Foo<'a>) {} diff --git a/tests/ui/generic-associated-types/missing_lifetime_const.rs b/tests/ui/generic-associated-types/missing_lifetime_const.rs index 8b174b9e971..6e395dfdec1 100644 --- a/tests/ui/generic-associated-types/missing_lifetime_const.rs +++ b/tests/ui/generic-associated-types/missing_lifetime_const.rs @@ -4,7 +4,7 @@ trait Foo { fn foo() { let _: ::Assoc<3>; - //~^ ERROR this associated type + //~^ ERROR associated type } fn main() {} diff --git a/tests/ui/generic-associated-types/missing_lifetime_const.stderr b/tests/ui/generic-associated-types/missing_lifetime_const.stderr index 62d2e9f49dd..41945aabfb5 100644 --- a/tests/ui/generic-associated-types/missing_lifetime_const.stderr +++ b/tests/ui/generic-associated-types/missing_lifetime_const.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/missing_lifetime_const.rs:6:24 | LL | let _: ::Assoc<3>; diff --git a/tests/ui/generic-associated-types/parameter_number_and_kind.rs b/tests/ui/generic-associated-types/parameter_number_and_kind.rs index 8428e7763fb..ae2f7c00ea4 100644 --- a/tests/ui/generic-associated-types/parameter_number_and_kind.rs +++ b/tests/ui/generic-associated-types/parameter_number_and_kind.rs @@ -9,10 +9,10 @@ trait Foo { // Test parameters in default values type FOk = Self::E<'static, T>; type FErr1 = Self::E<'static, 'static>; - //~^ ERROR this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied - //~| ERROR this associated type takes 1 + //~^ ERROR associated type takes 1 lifetime argument but 2 lifetime arguments were supplied + //~| ERROR associated type takes 1 type FErr2 = Self::E<'static, T, u32>; - //~^ ERROR this associated type takes 1 + //~^ ERROR associated type takes 1 } fn main() {} diff --git a/tests/ui/generic-associated-types/parameter_number_and_kind.stderr b/tests/ui/generic-associated-types/parameter_number_and_kind.stderr index c20b9669e81..4523044b588 100644 --- a/tests/ui/generic-associated-types/parameter_number_and_kind.stderr +++ b/tests/ui/generic-associated-types/parameter_number_and_kind.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/parameter_number_and_kind.rs:11:24 | LL | type FErr1 = Self::E<'static, 'static>; @@ -12,7 +12,7 @@ note: associated type defined here, with 1 lifetime parameter: `'a` LL | type E<'a, T>; | ^ -- -error[E0107]: this associated type takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: associated type takes 1 generic argument but 0 generic arguments were supplied --> $DIR/parameter_number_and_kind.rs:11:24 | LL | type FErr1 = Self::E<'static, 'static>; @@ -28,7 +28,7 @@ help: add missing generic argument LL | type FErr1 = Self::E<'static, 'static, T>; | +++ -error[E0107]: this associated type takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: associated type takes 1 generic argument but 2 generic arguments were supplied --> $DIR/parameter_number_and_kind.rs:14:27 | LL | type FErr2 = Self::E<'static, T, u32>; diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs index 1622b92aa0c..c58f9cf1dfc 100644 --- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs +++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs @@ -4,8 +4,8 @@ trait X { const _: () = { fn f2<'a>(arg : Box = &'a ()>>) {} - //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments - //~| ERROR this associated type takes 0 generic arguments but 1 generic argument + //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments + //~| ERROR associated type takes 0 generic arguments but 1 generic argument }; fn main() {} diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr index 0a09ec5dc49..fab5b474d92 100644 --- a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr +++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/trait-path-type-error-once-implemented.rs:6:29 | LL | fn f2<'a>(arg : Box = &'a ()>>) {} @@ -14,7 +14,7 @@ help: add missing lifetime argument LL | fn f2<'a>(arg : Box = &'a ()>>) {} | +++ -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/trait-path-type-error-once-implemented.rs:6:29 | LL | fn f2<'a>(arg : Box = &'a ()>>) {} diff --git a/tests/ui/generics/bad-mid-path-type-params.rs b/tests/ui/generics/bad-mid-path-type-params.rs index 23a5d1525d9..37d484cba0b 100644 --- a/tests/ui/generics/bad-mid-path-type-params.rs +++ b/tests/ui/generics/bad-mid-path-type-params.rs @@ -28,17 +28,17 @@ impl Trait for S2 { fn foo<'a>() { let _ = S::new::(1, 1.0); - //~^ ERROR this associated function takes 1 + //~^ ERROR associated function takes 1 let _ = S::<'a,isize>::new::(1, 1.0); - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied let _: S2 = Trait::new::(1, 1.0); - //~^ ERROR this associated function takes 1 + //~^ ERROR associated function takes 1 let _: S2 = Trait::<'a,isize>::new::(1, 1.0); - //~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this associated function takes 1 + //~^ ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR associated function takes 1 } fn main() {} diff --git a/tests/ui/generics/bad-mid-path-type-params.stderr b/tests/ui/generics/bad-mid-path-type-params.stderr index aee2b60159f..71e15dd4c92 100644 --- a/tests/ui/generics/bad-mid-path-type-params.stderr +++ b/tests/ui/generics/bad-mid-path-type-params.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:30:16 | LL | let _ = S::new::(1, 1.0); @@ -12,7 +12,7 @@ note: associated function defined here, with 1 generic parameter: `U` LL | fn new(x: T, _: U) -> S { | ^^^ - -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/bad-mid-path-type-params.rs:33:13 | LL | let _ = S::<'a,isize>::new::(1, 1.0); @@ -26,7 +26,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct S { | ^ -error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:36:24 | LL | let _: S2 = Trait::new::(1, 1.0); @@ -40,7 +40,7 @@ note: associated function defined here, with 1 generic parameter: `U` LL | fn new(x: T, y: U) -> Self; | ^^^ - -error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/bad-mid-path-type-params.rs:39:17 | LL | let _: S2 = Trait::<'a,isize>::new::(1, 1.0); @@ -54,7 +54,7 @@ note: trait defined here, with 0 lifetime parameters LL | trait Trait { | ^^^^^ -error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/bad-mid-path-type-params.rs:39:36 | LL | let _: S2 = Trait::<'a,isize>::new::(1, 1.0); diff --git a/tests/ui/generics/generic-arg-mismatch-recover.rs b/tests/ui/generics/generic-arg-mismatch-recover.rs index 2cf7f1d657b..947f33414db 100644 --- a/tests/ui/generics/generic-arg-mismatch-recover.rs +++ b/tests/ui/generics/generic-arg-mismatch-recover.rs @@ -4,9 +4,9 @@ struct Bar<'a>(&'a ()); fn main() { Foo::<'static, 'static, ()>(&0); - //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied Bar::<'static, 'static, ()>(&()); - //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied - //~| ERROR this struct takes 0 + //~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied + //~| ERROR struct takes 0 } diff --git a/tests/ui/generics/generic-arg-mismatch-recover.stderr b/tests/ui/generics/generic-arg-mismatch-recover.stderr index 45fea925f27..f549a7180fc 100644 --- a/tests/ui/generics/generic-arg-mismatch-recover.stderr +++ b/tests/ui/generics/generic-arg-mismatch-recover.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/generic-arg-mismatch-recover.rs:6:5 | LL | Foo::<'static, 'static, ()>(&0); @@ -12,7 +12,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Foo<'a, T: 'a>(&'a T); | ^^^ -- -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/generic-arg-mismatch-recover.rs:9:5 | LL | Bar::<'static, 'static, ()>(&()); @@ -26,7 +26,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Bar<'a>(&'a ()); | ^^^ -- -error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/generic-arg-mismatch-recover.rs:9:5 | LL | Bar::<'static, 'static, ()>(&()); diff --git a/tests/ui/generics/generic-impl-less-params-with-defaults.rs b/tests/ui/generics/generic-impl-less-params-with-defaults.rs index 66afbb58ad4..6c00411561e 100644 --- a/tests/ui/generics/generic-impl-less-params-with-defaults.rs +++ b/tests/ui/generics/generic-impl-less-params-with-defaults.rs @@ -9,5 +9,5 @@ impl Foo { fn main() { Foo::::new(); - //~^ ERROR this struct takes at least 2 generic arguments but 1 generic argument + //~^ ERROR struct takes at least 2 generic arguments but 1 generic argument } diff --git a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr index cdbb57902e4..262561fa81e 100644 --- a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr +++ b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/generic-impl-less-params-with-defaults.rs:11:5 | LL | Foo::::new(); diff --git a/tests/ui/generics/generic-impl-more-params-with-defaults.rs b/tests/ui/generics/generic-impl-more-params-with-defaults.rs index a283323742a..be633ec464f 100644 --- a/tests/ui/generics/generic-impl-more-params-with-defaults.rs +++ b/tests/ui/generics/generic-impl-more-params-with-defaults.rs @@ -11,5 +11,5 @@ impl Vec { fn main() { Vec::::new(); - //~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments were supplied + //~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments were supplied } diff --git a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr index fe9b670da79..2f4682c4e5a 100644 --- a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr +++ b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied +error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments were supplied --> $DIR/generic-impl-more-params-with-defaults.rs:13:5 | LL | Vec::::new(); diff --git a/tests/ui/generics/generic-type-more-params-with-defaults.rs b/tests/ui/generics/generic-type-more-params-with-defaults.rs index 3dab03297c9..b83fdb5c455 100644 --- a/tests/ui/generics/generic-type-more-params-with-defaults.rs +++ b/tests/ui/generics/generic-type-more-params-with-defaults.rs @@ -7,5 +7,5 @@ struct Vec( fn main() { let _: Vec; - //~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments + //~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments } diff --git a/tests/ui/generics/generic-type-more-params-with-defaults.stderr b/tests/ui/generics/generic-type-more-params-with-defaults.stderr index 7f0198f0e84..4d01ba1f453 100644 --- a/tests/ui/generics/generic-type-more-params-with-defaults.stderr +++ b/tests/ui/generics/generic-type-more-params-with-defaults.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied +error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments were supplied --> $DIR/generic-type-more-params-with-defaults.rs:9:12 | LL | let _: Vec; diff --git a/tests/ui/generics/wrong-number-of-args.rs b/tests/ui/generics/wrong-number-of-args.rs index cd2f96a1819..e4eaff21af1 100644 --- a/tests/ui/generics/wrong-number-of-args.rs +++ b/tests/ui/generics/wrong-number-of-args.rs @@ -4,18 +4,18 @@ mod no_generics { type A = Ty; type B = Ty<'static>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics type C = Ty<'static, usize>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument - //~| ERROR this struct takes 0 generic arguments but 1 generic argument + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument + //~| ERROR struct takes 0 generic arguments but 1 generic argument //~| HELP remove this lifetime argument //~| HELP remove this generic argument type D = Ty<'static, usize, { 0 }>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument - //~| ERROR this struct takes 0 generic arguments but 2 generic arguments + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument + //~| ERROR struct takes 0 generic arguments but 2 generic arguments //~| HELP remove this lifetime argument //~| HELP remove these generic arguments } @@ -28,17 +28,17 @@ mod type_and_type { //~| HELP add missing type B = Ty; - //~^ ERROR this struct takes 2 generic arguments but 1 generic argument + //~^ ERROR struct takes 2 generic arguments but 1 generic argument //~| HELP add missing type C = Ty; type D = Ty; - //~^ ERROR this struct takes 2 generic arguments but 3 generic arguments + //~^ ERROR struct takes 2 generic arguments but 3 generic arguments //~| HELP remove this type E = Ty<>; - //~^ ERROR this struct takes 2 generic arguments but 0 generic arguments were supplied + //~^ ERROR struct takes 2 generic arguments but 0 generic arguments were supplied //~| HELP add missing } @@ -52,7 +52,7 @@ mod lifetime_and_type { //~| HELP consider introducing type B = Ty<'static>; - //~^ ERROR this struct takes 1 generic argument but 0 generic arguments + //~^ ERROR struct takes 1 generic argument but 0 generic arguments //~| HELP add missing type C = Ty; @@ -62,14 +62,14 @@ mod lifetime_and_type { type D = Ty<'static, usize>; type E = Ty<>; - //~^ ERROR this struct takes 1 generic argument but 0 generic arguments + //~^ ERROR struct takes 1 generic argument but 0 generic arguments //~| ERROR missing lifetime specifier //~| HELP consider introducing //~| HELP add missing type F = Ty<'static, usize, 'static, usize>; - //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments - //~| ERROR this struct takes 1 generic argument but 2 generic arguments + //~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments + //~| ERROR struct takes 1 generic argument but 2 generic arguments //~| HELP remove this lifetime argument //~| HELP remove this generic argument } @@ -82,7 +82,7 @@ mod type_and_type_and_type { //~| HELP add missing type B = Ty; - //~^ ERROR this struct takes at least 2 + //~^ ERROR struct takes at least 2 //~| HELP add missing type C = Ty; @@ -90,11 +90,11 @@ mod type_and_type_and_type { type D = Ty; type E = Ty; - //~^ ERROR this struct takes at most 3 + //~^ ERROR struct takes at most 3 //~| HELP remove type F = Ty<>; - //~^ ERROR this struct takes at least 2 generic arguments but 0 generic arguments + //~^ ERROR struct takes at least 2 generic arguments but 0 generic arguments //~| HELP add missing } @@ -114,7 +114,7 @@ mod r#trait { } type A = Box>; - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| HELP remove type B = Box; @@ -123,7 +123,7 @@ mod r#trait { //~| HELP consider making the bound lifetime-generic type C = Box>; - //~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied //~| HELP remove type D = Box; @@ -131,7 +131,7 @@ mod r#trait { //~| HELP add missing type E = Box>; - //~^ ERROR this trait takes 1 generic argument but 2 generic arguments + //~^ ERROR trait takes 1 generic argument but 2 generic arguments //~| HELP remove type F = Box>; @@ -140,7 +140,7 @@ mod r#trait { //~| HELP consider making the bound lifetime-generic type G = Box>; - //~^ ERROR this trait takes 1 generic argument but 0 generic arguments + //~^ ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing } @@ -151,7 +151,7 @@ mod associated_item { } type A = Box>; - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| HELP remove } @@ -166,14 +166,14 @@ mod associated_item { //~| HELP consider making the bound lifetime-generic type B = Box>; - //~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied //~| HELP remove type C = Box>; //~^ ERROR missing lifetime specifier //~| HELP consider introducing //~| HELP consider making the bound lifetime-generic - //~| ERROR this trait takes 0 generic arguments but 1 generic argument + //~| ERROR trait takes 0 generic arguments but 1 generic argument //~| HELP remove } @@ -183,17 +183,17 @@ mod associated_item { } type A = Box>; - //~^ ERROR this trait takes 1 generic argument but 0 generic arguments + //~^ ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing type B = Box>; - //~^ ERROR this trait takes 1 generic argument but 2 generic arguments + //~^ ERROR trait takes 1 generic argument but 2 generic arguments //~| HELP remove type C = Box>; - //~^ ERROR this trait takes 1 generic argument but 0 generic arguments + //~^ ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing - //~| ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied //~| HELP remove } @@ -203,20 +203,20 @@ mod associated_item { } type A = Box>; - //~^ ERROR this trait takes 1 generic argument but 0 generic arguments + //~^ ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing //~| ERROR missing lifetime specifier //~| HELP consider introducing //~| HELP consider making the bound lifetime-generic type B = Box>; - //~^ ERROR this trait takes 1 generic argument but 0 generic arguments were supplied + //~^ ERROR trait takes 1 generic argument but 0 generic arguments were supplied //~| HELP add missing type C = Box>; - //~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied //~| HELP remove - //~| ERROR this trait takes 1 generic argument but 0 generic arguments + //~| ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing type D = Box>; @@ -228,21 +228,21 @@ mod associated_item { //~^ ERROR missing lifetime specifier //~| HELP consider introducing //~| HELP consider making the bound lifetime-generic - //~| ERROR this trait takes 1 generic argument but 2 generic arguments + //~| ERROR trait takes 1 generic argument but 2 generic arguments //~| HELP remove type F = Box>; - //~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied //~| HELP remove type G = Box>; - //~^ ERROR this trait takes 1 generic argument but 2 generic arguments + //~^ ERROR trait takes 1 generic argument but 2 generic arguments //~| HELP remove type H = Box>; - //~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied //~| HELP remove - //~| ERROR this trait takes 1 generic argument but 2 generic arguments + //~| ERROR trait takes 1 generic argument but 2 generic arguments //~| HELP remove } @@ -252,15 +252,15 @@ mod associated_item { } type A = Box>; - //~^ ERROR this trait takes 2 generic arguments but 0 generic arguments + //~^ ERROR trait takes 2 generic arguments but 0 generic arguments //~| HELP add missing type B = Box>; - //~^ ERROR this trait takes 2 generic arguments but 1 generic argument + //~^ ERROR trait takes 2 generic arguments but 1 generic argument //~| HELP add missing type C = Box>; - //~^ ERROR this trait takes 2 generic arguments but 3 generic arguments + //~^ ERROR trait takes 2 generic arguments but 3 generic arguments //~| HELP remove } @@ -275,7 +275,7 @@ mod associated_item { //~| HELP consider making the bound lifetime-generic type B = Box>; - //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied //~| HELP add missing lifetime argument } @@ -288,17 +288,17 @@ mod associated_item { //~^ ERROR missing lifetime specifier //~| HELP consider introducing //~| HELP consider making the bound lifetime-generic - //~| ERROR this trait takes 1 generic argument but 0 generic arguments + //~| ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing type B = Box>; - //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied //~| HELP add missing lifetime argument - //~| ERROR this trait takes 1 generic argument but 0 generic arguments + //~| ERROR trait takes 1 generic argument but 0 generic arguments //~| HELP add missing type C = Box>; - //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied //~| HELP add missing lifetime argument } } @@ -312,21 +312,21 @@ mod stdlib { //~| HELP add missing type B = HashMap; - //~^ ERROR this struct takes at least + //~^ ERROR struct takes at least //~| HELP add missing type C = HashMap<'static>; - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics - //~| ERROR this struct takes at least 2 + //~| ERROR struct takes at least 2 //~| HELP add missing type D = HashMap; - //~^ ERROR this struct takes at most 3 + //~^ ERROR struct takes at most 3 //~| HELP remove this type E = HashMap<>; - //~^ ERROR this struct takes at least 2 generic arguments but 0 generic arguments + //~^ ERROR struct takes at least 2 generic arguments but 0 generic arguments //~| HELP add missing } @@ -336,21 +336,21 @@ mod stdlib { //~| HELP add missing type B = Result; - //~^ ERROR this enum takes 2 generic arguments but 1 generic argument + //~^ ERROR enum takes 2 generic arguments but 1 generic argument //~| HELP add missing type C = Result<'static>; - //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument + //~^ ERROR enum takes 0 lifetime arguments but 1 lifetime argument //~| HELP remove these generics - //~| ERROR this enum takes 2 generic arguments but 0 generic arguments + //~| ERROR enum takes 2 generic arguments but 0 generic arguments //~| HELP add missing type D = Result; - //~^ ERROR this enum takes 2 generic arguments but 3 generic arguments + //~^ ERROR enum takes 2 generic arguments but 3 generic arguments //~| HELP remove type E = Result<>; - //~^ ERROR this enum takes 2 generic arguments but 0 generic arguments + //~^ ERROR enum takes 2 generic arguments but 0 generic arguments //~| HELP add missing } } diff --git a/tests/ui/generics/wrong-number-of-args.stderr b/tests/ui/generics/wrong-number-of-args.stderr index 75e33f680ea..9006fb10b67 100644 --- a/tests/ui/generics/wrong-number-of-args.stderr +++ b/tests/ui/generics/wrong-number-of-args.stderr @@ -167,7 +167,7 @@ help: consider introducing a named lifetime parameter LL | type A<'a> = Box>; | ++++ +++++++ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:6:14 | LL | type B = Ty<'static>; @@ -181,7 +181,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct Ty; | ^^ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:10:14 | LL | type C = Ty<'static, usize>; @@ -195,7 +195,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct Ty; | ^^ -error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:10:14 | LL | type C = Ty<'static, usize>; @@ -209,7 +209,7 @@ note: struct defined here, with 0 generic parameters LL | struct Ty; | ^^ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:16:14 | LL | type D = Ty<'static, usize, { 0 }>; @@ -223,7 +223,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct Ty; | ^^ -error[E0107]: this struct takes 0 generic arguments but 2 generic arguments were supplied +error[E0107]: struct takes 0 generic arguments but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:16:14 | LL | type D = Ty<'static, usize, { 0 }>; @@ -253,7 +253,7 @@ help: add missing generic arguments LL | type A = Ty; | ++++++ -error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:30:14 | LL | type B = Ty; @@ -271,7 +271,7 @@ help: add missing generic argument LL | type B = Ty; | +++ -error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied +error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:36:14 | LL | type D = Ty; @@ -285,7 +285,7 @@ note: struct defined here, with 2 generic parameters: `A`, `B` LL | struct Ty; | ^^ - - -error[E0107]: this struct takes 2 generic arguments but 0 generic arguments were supplied +error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:40:14 | LL | type E = Ty<>; @@ -317,7 +317,7 @@ help: add missing generic argument LL | type A = Ty; | +++ -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:54:14 | LL | type B = Ty<'static>; @@ -333,7 +333,7 @@ help: add missing generic argument LL | type B = Ty<'static, T>; | +++ -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:64:14 | LL | type E = Ty<>; @@ -349,7 +349,7 @@ help: add missing generic argument LL | type E = Ty; | + -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:70:14 | LL | type F = Ty<'static, usize, 'static, usize>; @@ -363,7 +363,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct Ty<'a, T>; | ^^ -- -error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:70:14 | LL | type F = Ty<'static, usize, 'static, usize>; @@ -393,7 +393,7 @@ help: add missing generic arguments LL | type A = Ty; | ++++++ -error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:84:14 | LL | type B = Ty; @@ -411,7 +411,7 @@ help: add missing generic argument LL | type B = Ty; | +++ -error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied +error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:92:14 | LL | type E = Ty; @@ -425,7 +425,7 @@ note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C` LL | struct Ty; | ^^ - - ---------------- -error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied +error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:96:14 | LL | type F = Ty<>; @@ -441,7 +441,7 @@ help: add missing generic arguments LL | type F = Ty; | ++++ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:116:22 | LL | type A = Box>; @@ -455,7 +455,7 @@ note: trait defined here, with 0 generic parameters LL | trait NonGeneric { | ^^^^^^^^^^ -error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:125:22 | LL | type C = Box>; @@ -485,7 +485,7 @@ help: add missing generic argument LL | type D = Box>; | +++ -error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:133:22 | LL | type E = Box>; @@ -499,7 +499,7 @@ note: trait defined here, with 1 generic parameter: `A` LL | trait GenericType { | ^^^^^^^^^^^ - -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:142:22 | LL | type G = Box>; @@ -515,7 +515,7 @@ help: add missing generic argument LL | type G = Box>; | + -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:153:26 | LL | type A = Box>; @@ -529,7 +529,7 @@ note: trait defined here, with 0 generic parameters LL | trait NonGenericAT { | ^^^^^^^^^^^^ -error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:168:26 | LL | type B = Box>; @@ -543,7 +543,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` LL | trait GenericLifetimeAT<'a> { | ^^^^^^^^^^^^^^^^^ -- -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:172:26 | LL | type C = Box>; @@ -557,7 +557,7 @@ note: trait defined here, with 0 generic parameters LL | trait GenericLifetimeAT<'a> { | ^^^^^^^^^^^^^^^^^ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:185:26 | LL | type A = Box>; @@ -573,7 +573,7 @@ help: add missing generic argument LL | type A = Box>; | ++ -error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:189:26 | LL | type B = Box>; @@ -587,7 +587,7 @@ note: trait defined here, with 1 generic parameter: `A` LL | trait GenericTypeAT { | ^^^^^^^^^^^^^ - -error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:193:26 | LL | type C = Box>; @@ -601,7 +601,7 @@ note: trait defined here, with 0 lifetime parameters LL | trait GenericTypeAT { | ^^^^^^^^^^^^^ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:193:26 | LL | type C = Box>; @@ -617,7 +617,7 @@ help: add missing generic argument LL | type C = Box>; | +++ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:205:26 | LL | type A = Box>; @@ -633,7 +633,7 @@ help: add missing generic argument LL | type A = Box>; | ++ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:212:26 | LL | type B = Box>; @@ -649,7 +649,7 @@ help: add missing generic argument LL | type B = Box>; | +++ -error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:216:26 | LL | type C = Box>; @@ -663,7 +663,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:216:26 | LL | type C = Box>; @@ -679,7 +679,7 @@ help: add missing generic argument LL | type C = Box>; | +++ -error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:227:26 | LL | type E = Box>; @@ -693,7 +693,7 @@ note: trait defined here, with 1 generic parameter: `A` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:234:26 | LL | type F = Box>; @@ -707,7 +707,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:238:26 | LL | type G = Box>; @@ -721,7 +721,7 @@ note: trait defined here, with 1 generic parameter: `A` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/wrong-number-of-args.rs:242:26 | LL | type H = Box>; @@ -735,7 +735,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:242:26 | LL | type H = Box>; @@ -749,7 +749,7 @@ note: trait defined here, with 1 generic parameter: `A` LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -error[E0107]: this trait takes 2 generic arguments but 0 generic arguments were supplied +error[E0107]: trait takes 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:254:26 | LL | type A = Box>; @@ -765,7 +765,7 @@ help: add missing generic arguments LL | type A = Box>; | +++++ -error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:258:26 | LL | type B = Box>; @@ -783,7 +783,7 @@ help: add missing generic argument LL | type B = Box>; | +++ -error[E0107]: this trait takes 2 generic arguments but 3 generic arguments were supplied +error[E0107]: trait takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:262:26 | LL | type C = Box>; @@ -797,7 +797,7 @@ note: trait defined here, with 2 generic parameters: `A`, `B` LL | trait GenericTypeTypeAT { | ^^^^^^^^^^^^^^^^^ - - -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:277:26 | LL | type B = Box>; @@ -815,7 +815,7 @@ help: add missing lifetime argument LL | type B = Box>; | +++++++++ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:287:26 | LL | type A = Box>; @@ -831,7 +831,7 @@ help: add missing generic argument LL | type A = Box>; | ++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:294:26 | LL | type B = Box>; @@ -849,7 +849,7 @@ help: add missing lifetime argument LL | type B = Box>; | +++++++++ -error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:294:26 | LL | type B = Box>; @@ -865,7 +865,7 @@ help: add missing generic argument LL | type B = Box>; | +++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:300:26 | LL | type C = Box>; @@ -894,7 +894,7 @@ help: add missing generic arguments LL | type A = HashMap; | ++++++ -error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:314:18 | LL | type B = HashMap; @@ -907,7 +907,7 @@ help: add missing generic argument LL | type B = HashMap; | +++ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:318:18 | LL | type C = HashMap<'static>; @@ -915,7 +915,7 @@ LL | type C = HashMap<'static>; | | | expected 0 lifetime arguments -error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied +error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:318:18 | LL | type C = HashMap<'static>; @@ -926,7 +926,7 @@ help: add missing generic arguments LL | type C = HashMap<'static, K, V>; | ++++++ -error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied +error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:324:18 | LL | type D = HashMap; @@ -934,7 +934,7 @@ LL | type D = HashMap; | | | expected at most 3 generic arguments -error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied +error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:328:18 | LL | type E = HashMap<>; @@ -956,7 +956,7 @@ help: add missing generic arguments LL | type A = Result; | ++++++ -error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/wrong-number-of-args.rs:338:18 | LL | type B = Result; @@ -969,7 +969,7 @@ help: add missing generic argument LL | type B = Result; | +++ -error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/wrong-number-of-args.rs:342:18 | LL | type C = Result<'static>; @@ -977,7 +977,7 @@ LL | type C = Result<'static>; | | | expected 0 lifetime arguments -error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied +error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:342:18 | LL | type C = Result<'static>; @@ -988,7 +988,7 @@ help: add missing generic arguments LL | type C = Result<'static, T, E>; | ++++++ -error[E0107]: this enum takes 2 generic arguments but 3 generic arguments were supplied +error[E0107]: enum takes 2 generic arguments but 3 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:348:18 | LL | type D = Result; @@ -996,7 +996,7 @@ LL | type D = Result; | | | expected 2 generic arguments -error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied +error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied --> $DIR/wrong-number-of-args.rs:352:18 | LL | type E = Result<>; diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr index c8b82783ea8..9c101101870 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied --> $DIR/explicit-generic-args-for-impl.rs:4:5 | LL | foo::("".to_string()); diff --git a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr index 9d6db88d364..a26460c8ecc 100644 --- a/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr +++ b/tests/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied --> $DIR/not-enough-args.rs:4:5 | LL | f::<[u8]>("a", b"a"); diff --git a/tests/ui/issues/issue-18423.rs b/tests/ui/issues/issue-18423.rs index a81b32f050c..675fd041154 100644 --- a/tests/ui/issues/issue-18423.rs +++ b/tests/ui/issues/issue-18423.rs @@ -2,7 +2,7 @@ struct Foo<'a> { x: Box<'a, isize> - //~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied } fn main() { } diff --git a/tests/ui/issues/issue-18423.stderr b/tests/ui/issues/issue-18423.stderr index bbf79366244..5d154dbbbdd 100644 --- a/tests/ui/issues/issue-18423.stderr +++ b/tests/ui/issues/issue-18423.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/issue-18423.rs:4:8 | LL | x: Box<'a, isize> diff --git a/tests/ui/issues/issue-3214.rs b/tests/ui/issues/issue-3214.rs index 928a65938b7..e3c07bb3f72 100644 --- a/tests/ui/issues/issue-3214.rs +++ b/tests/ui/issues/issue-3214.rs @@ -4,7 +4,7 @@ fn foo() { } impl Drop for Foo { - //~^ ERROR this struct takes 0 generic arguments but 1 generic argument + //~^ ERROR struct takes 0 generic arguments but 1 generic argument fn drop(&mut self) {} } } diff --git a/tests/ui/issues/issue-3214.stderr b/tests/ui/issues/issue-3214.stderr index aa0b5ce64b4..7a2d772f0a1 100644 --- a/tests/ui/issues/issue-3214.stderr +++ b/tests/ui/issues/issue-3214.stderr @@ -8,7 +8,7 @@ LL | struct Foo { LL | x: T, | ^ use of generic parameter from outer function -error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-3214.rs:6:22 | LL | impl Drop for Foo { diff --git a/tests/ui/issues/issue-53251.rs b/tests/ui/issues/issue-53251.rs index 240826a161d..da3ba63ef67 100644 --- a/tests/ui/issues/issue-53251.rs +++ b/tests/ui/issues/issue-53251.rs @@ -9,8 +9,8 @@ macro_rules! impl_add { $( fn $n() { S::f::(); - //~^ ERROR this associated function takes 0 generic - //~| ERROR this associated function takes 0 generic + //~^ ERROR associated function takes 0 generic + //~| ERROR associated function takes 0 generic } )* } diff --git a/tests/ui/issues/issue-53251.stderr b/tests/ui/issues/issue-53251.stderr index cee9a5deb05..d5f14e8deb9 100644 --- a/tests/ui/issues/issue-53251.stderr +++ b/tests/ui/issues/issue-53251.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-53251.rs:11:20 | LL | S::f::(); @@ -16,7 +16,7 @@ LL | fn f() {} | ^ = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-53251.rs:11:20 | LL | S::f::(); diff --git a/tests/ui/issues/issue-60622.rs b/tests/ui/issues/issue-60622.rs index 7347957906c..7b9443eee50 100644 --- a/tests/ui/issues/issue-60622.rs +++ b/tests/ui/issues/issue-60622.rs @@ -9,7 +9,7 @@ impl Borked { fn run_wild(b: &Borked) { b.a::<'_, T>(); //~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present - //~| ERROR this method takes 0 generic arguments but 1 generic argument + //~| ERROR method takes 0 generic arguments but 1 generic argument //~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! } diff --git a/tests/ui/issues/issue-60622.stderr b/tests/ui/issues/issue-60622.stderr index 69b532b8f97..43da2773940 100644 --- a/tests/ui/issues/issue-60622.stderr +++ b/tests/ui/issues/issue-60622.stderr @@ -16,7 +16,7 @@ LL | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]` -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-60622.rs:10:7 | LL | b.a::<'_, T>(); diff --git a/tests/ui/late-bound-lifetimes/mismatched_arg_count.rs b/tests/ui/late-bound-lifetimes/mismatched_arg_count.rs index 0b331e2039f..792563fd82b 100644 --- a/tests/ui/late-bound-lifetimes/mismatched_arg_count.rs +++ b/tests/ui/late-bound-lifetimes/mismatched_arg_count.rs @@ -7,6 +7,6 @@ trait Trait<'a> { type Alias<'a, T> = >::Assoc; fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} -//~^ error: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied +//~^ error: type alias takes 1 lifetime argument but 2 lifetime arguments were supplied fn main() {} diff --git a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr index 3704d9bb957..de58a014ee8 100644 --- a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr +++ b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr @@ -1,4 +1,4 @@ -error[E0107]: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/mismatched_arg_count.rs:9:29 | LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} diff --git a/tests/ui/methods/method-call-lifetime-args-fail.rs b/tests/ui/methods/method-call-lifetime-args-fail.rs index 2e5c9a0b891..1f13de094bb 100644 --- a/tests/ui/methods/method-call-lifetime-args-fail.rs +++ b/tests/ui/methods/method-call-lifetime-args-fail.rs @@ -14,9 +14,9 @@ impl S { fn method_call() { S.early(); // OK S.early::<'static>(); - //~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument + //~^ ERROR method takes 2 lifetime arguments but 1 lifetime argument S.early::<'static, 'static, 'static>(); - //~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied + //~^ ERROR method takes 2 lifetime arguments but 3 lifetime arguments were supplied let _: &u8 = S.life_and_type::<'static>(); S.life_and_type::(); S.life_and_type::<'static, u8>(); @@ -61,9 +61,9 @@ fn ufcs() { S::early(S); // OK S::early::<'static>(S); - //~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument + //~^ ERROR method takes 2 lifetime arguments but 1 lifetime argument S::early::<'static, 'static, 'static>(S); - //~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied + //~^ ERROR method takes 2 lifetime arguments but 3 lifetime arguments were supplied let _: &u8 = S::life_and_type::<'static>(S); S::life_and_type::(S); S::life_and_type::<'static, u8>(S); diff --git a/tests/ui/methods/method-call-lifetime-args-fail.stderr b/tests/ui/methods/method-call-lifetime-args-fail.stderr index 45ff32bdd4c..34526256f99 100644 --- a/tests/ui/methods/method-call-lifetime-args-fail.stderr +++ b/tests/ui/methods/method-call-lifetime-args-fail.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: method takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/method-call-lifetime-args-fail.rs:16:7 | LL | S.early::<'static>(); @@ -16,7 +16,7 @@ help: add missing lifetime argument LL | S.early::<'static, 'static>(); | +++++++++ -error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied +error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/method-call-lifetime-args-fail.rs:18:7 | LL | S.early::<'static, 'static, 'static>(); @@ -198,7 +198,7 @@ note: the late bound lifetime parameter is introduced here LL | fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} } | ^^ -error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: method takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/method-call-lifetime-args-fail.rs:63:8 | LL | S::early::<'static>(S); @@ -216,7 +216,7 @@ help: add missing lifetime argument LL | S::early::<'static, 'static>(S); | +++++++++ -error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied +error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were supplied --> $DIR/method-call-lifetime-args-fail.rs:65:8 | LL | S::early::<'static, 'static, 'static>(S); diff --git a/tests/ui/seq-args.rs b/tests/ui/seq-args.rs index a5ebeecd311..627dfcc3198 100644 --- a/tests/ui/seq-args.rs +++ b/tests/ui/seq-args.rs @@ -2,12 +2,12 @@ fn main() { trait Seq { } impl Seq for Vec { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument /* ... */ } impl Seq for u32 { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument /* Treat the integer as a sequence of bits */ } } diff --git a/tests/ui/seq-args.stderr b/tests/ui/seq-args.stderr index c404d95748b..a5b0f8e98dc 100644 --- a/tests/ui/seq-args.stderr +++ b/tests/ui/seq-args.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/seq-args.rs:4:13 | LL | impl Seq for Vec { @@ -12,7 +12,7 @@ note: trait defined here, with 0 generic parameters LL | trait Seq { } | ^^^ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/seq-args.rs:9:10 | LL | impl Seq for u32 { diff --git a/tests/ui/structs/struct-path-associated-type.rs b/tests/ui/structs/struct-path-associated-type.rs index 2dd7174a9be..74d9705d4b8 100644 --- a/tests/ui/structs/struct-path-associated-type.rs +++ b/tests/ui/structs/struct-path-associated-type.rs @@ -13,7 +13,7 @@ fn f() { //~^ ERROR expected struct, variant or union type, found associated type let z = T::A:: {}; //~^ ERROR expected struct, variant or union type, found associated type - //~| ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied + //~| ERROR associated type takes 0 generic arguments but 1 generic argument was supplied match S { T::A {} => {} //~^ ERROR expected struct, variant or union type, found associated type @@ -22,7 +22,7 @@ fn f() { fn g>() { let s = T::A {}; // OK - let z = T::A:: {}; //~ ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied + let z = T::A:: {}; //~ ERROR associated type takes 0 generic arguments but 1 generic argument was supplied match S { T::A {} => {} // OK } diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr index ca5f0b7e21e..acfddaf3760 100644 --- a/tests/ui/structs/struct-path-associated-type.stderr +++ b/tests/ui/structs/struct-path-associated-type.stderr @@ -4,7 +4,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | let s = T::A {}; | ^^^^ not a struct -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/struct-path-associated-type.rs:14:16 | LL | let z = T::A:: {}; @@ -30,7 +30,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | T::A {} => {} | ^^^^ not a struct -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/struct-path-associated-type.rs:25:16 | LL | let z = T::A:: {}; diff --git a/tests/ui/structs/structure-constructor-type-mismatch.rs b/tests/ui/structs/structure-constructor-type-mismatch.rs index a03ef590cb3..21cd9d08b21 100644 --- a/tests/ui/structs/structure-constructor-type-mismatch.rs +++ b/tests/ui/structs/structure-constructor-type-mismatch.rs @@ -45,13 +45,13 @@ fn main() { y: 8, }; - let pt3 = PointF:: { //~ ERROR this type alias takes 0 generic arguments but 1 generic argument + let pt3 = PointF:: { //~ ERROR type alias takes 0 generic arguments but 1 generic argument x: 9, //~ ERROR mismatched types y: 10, //~ ERROR mismatched types }; match (Point { x: 1, y: 2 }) { - PointF:: { .. } => {} //~ ERROR this type alias takes 0 generic arguments but 1 generic argument + PointF:: { .. } => {} //~ ERROR type alias takes 0 generic arguments but 1 generic argument //~^ ERROR mismatched types } diff --git a/tests/ui/structs/structure-constructor-type-mismatch.stderr b/tests/ui/structs/structure-constructor-type-mismatch.stderr index 3e3f9ea06ef..63dda459396 100644 --- a/tests/ui/structs/structure-constructor-type-mismatch.stderr +++ b/tests/ui/structs/structure-constructor-type-mismatch.stderr @@ -52,7 +52,7 @@ LL | x: 7, | expected `f32`, found integer | help: use a float literal: `7.0` -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/structure-constructor-type-mismatch.rs:48:15 | LL | let pt3 = PointF:: { @@ -84,7 +84,7 @@ LL | y: 10, | expected `f32`, found integer | help: use a float literal: `10.0` -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/structure-constructor-type-mismatch.rs:54:9 | LL | PointF:: { .. } => {} diff --git a/tests/ui/suggestions/issue-101421.rs b/tests/ui/suggestions/issue-101421.rs index 53b1e885737..1407ebd277c 100644 --- a/tests/ui/suggestions/issue-101421.rs +++ b/tests/ui/suggestions/issue-101421.rs @@ -8,5 +8,5 @@ impl Ice for () { fn main() { ().f::<()>(()); - //~^ ERROR this method takes 0 generic arguments but 1 generic argument was supplied + //~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied } diff --git a/tests/ui/suggestions/issue-101421.stderr b/tests/ui/suggestions/issue-101421.stderr index 8362f02bbe4..2656ab3db0b 100644 --- a/tests/ui/suggestions/issue-101421.stderr +++ b/tests/ui/suggestions/issue-101421.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-101421.rs:10:8 | LL | ().f::<()>(()); diff --git a/tests/ui/suggestions/issue-104287.rs b/tests/ui/suggestions/issue-104287.rs index 752282e065d..37b3339fa92 100644 --- a/tests/ui/suggestions/issue-104287.rs +++ b/tests/ui/suggestions/issue-104287.rs @@ -8,6 +8,6 @@ impl S { fn main() { let x = S; foo::<()>(x); - //~^ ERROR this method takes 0 generic arguments but 1 generic argument was supplied + //~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied //~| ERROR cannot find function `foo` in this scope } diff --git a/tests/ui/suggestions/issue-104287.stderr b/tests/ui/suggestions/issue-104287.stderr index d363601e952..ed59b2e7a2d 100644 --- a/tests/ui/suggestions/issue-104287.stderr +++ b/tests/ui/suggestions/issue-104287.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-104287.rs:10:5 | LL | foo::<()>(x); diff --git a/tests/ui/suggestions/issue-85347.rs b/tests/ui/suggestions/issue-85347.rs index 02b5fb61894..04d4c47d8e5 100644 --- a/tests/ui/suggestions/issue-85347.rs +++ b/tests/ui/suggestions/issue-85347.rs @@ -1,7 +1,7 @@ use std::ops::Deref; trait Foo { type Bar<'a>: Deref::Bar>; - //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied + //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments were supplied //~| ERROR associated type bindings are not allowed here //~| HELP add missing } diff --git a/tests/ui/suggestions/issue-85347.stderr b/tests/ui/suggestions/issue-85347.stderr index 17c1b7dc4cc..f330b3c1fad 100644 --- a/tests/ui/suggestions/issue-85347.stderr +++ b/tests/ui/suggestions/issue-85347.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/issue-85347.rs:3:42 | LL | type Bar<'a>: Deref::Bar>; diff --git a/tests/ui/suggestions/issue-89064.stderr b/tests/ui/suggestions/issue-89064.stderr index b238c1804ee..be09dd89512 100644 --- a/tests/ui/suggestions/issue-89064.stderr +++ b/tests/ui/suggestions/issue-89064.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:17:16 | LL | let _ = A::foo::(); @@ -20,7 +20,7 @@ LL - let _ = A::foo::(); LL + let _ = A::foo(); | -error[E0107]: this associated function takes 0 generic arguments but 2 generic arguments were supplied +error[E0107]: associated function takes 0 generic arguments but 2 generic arguments were supplied --> $DIR/issue-89064.rs:22:16 | LL | let _ = B::bar::(); @@ -42,7 +42,7 @@ LL - let _ = B::bar::(); LL + let _ = B::bar(); | -error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:27:21 | LL | let _ = A::::foo::(); @@ -56,7 +56,7 @@ note: associated function defined here, with 0 generic parameters LL | fn foo() {} | ^^^ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-89064.rs:31:16 | LL | let _ = 42.into::>(); diff --git a/tests/ui/suggestions/missing-lifetime-specifier.rs b/tests/ui/suggestions/missing-lifetime-specifier.rs index 24f5f782f35..cb734e8ba85 100644 --- a/tests/ui/suggestions/missing-lifetime-specifier.rs +++ b/tests/ui/suggestions/missing-lifetime-specifier.rs @@ -37,19 +37,19 @@ thread_local! { thread_local! { static e: RefCell>>>> = RefCell::new(HashMap::new()); - //~^ ERROR this union takes 2 lifetime arguments but 1 lifetime argument - //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR union takes 2 lifetime arguments but 1 lifetime argument + //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied } thread_local! { static f: RefCell>>>> = RefCell::new(HashMap::new()); - //~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied - //~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied + //~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied //~| ERROR missing lifetime //~| ERROR missing lifetime } diff --git a/tests/ui/suggestions/missing-lifetime-specifier.stderr b/tests/ui/suggestions/missing-lifetime-specifier.stderr index 997bbb5e9b5..21d2378382c 100644 --- a/tests/ui/suggestions/missing-lifetime-specifier.stderr +++ b/tests/ui/suggestions/missing-lifetime-specifier.stderr @@ -133,7 +133,7 @@ LL | | } | = help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from -error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:39:44 | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); @@ -151,7 +151,7 @@ help: add missing lifetime argument LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:39:44 | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); @@ -169,7 +169,7 @@ help: add missing lifetime argument LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:39:44 | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); @@ -187,7 +187,7 @@ help: add missing lifetime argument LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:39:44 | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); @@ -205,7 +205,7 @@ help: add missing lifetime argument LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:39:44 | LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); @@ -223,7 +223,7 @@ help: add missing lifetime argument LL | static e: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:47:45 | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); @@ -241,7 +241,7 @@ help: add missing lifetime argument LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:47:45 | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); @@ -259,7 +259,7 @@ help: add missing lifetime argument LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:47:45 | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); @@ -277,7 +277,7 @@ help: add missing lifetime argument LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:47:45 | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); @@ -295,7 +295,7 @@ help: add missing lifetime argument LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); | +++++++++ -error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/missing-lifetime-specifier.rs:47:45 | LL | static f: RefCell>>>> = RefCell::new(HashMap::new()); diff --git a/tests/ui/suggestions/missing-type-param-used-in-param.stderr b/tests/ui/suggestions/missing-type-param-used-in-param.stderr index 4f7058a6492..3116c5a0a1c 100644 --- a/tests/ui/suggestions/missing-type-param-used-in-param.stderr +++ b/tests/ui/suggestions/missing-type-param-used-in-param.stderr @@ -1,4 +1,4 @@ -error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied --> $DIR/missing-type-param-used-in-param.rs:6:5 | LL | two_type_params::(100); diff --git a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.rs b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.rs index 5e1f9361b39..4066cd3b11a 100644 --- a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.rs +++ b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.rs @@ -12,7 +12,7 @@ impl Foo for i32 { fn main() { 1.bar::(0); - //~^ ERROR this method takes 0 generic arguments but 1 generic argument was supplied + //~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied //~| HELP consider moving this generic argument to the `Foo` trait, which takes up to 1 argument //~| HELP remove these generics } diff --git a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr index 8ebff75c135..bfdb35947ef 100644 --- a/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr +++ b/tests/ui/suggestions/move-generic-to-trait-in-method-with-params.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/move-generic-to-trait-in-method-with-params.rs:14:7 | LL | 1.bar::(0); diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr index fcff02e09db..4e3180e84d2 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr @@ -18,7 +18,7 @@ LL | let _: Vec = A::B; = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable -error[E0107]: this struct takes at least 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes at least 1 generic argument but 0 generic arguments were supplied --> $DIR/type-ascription-instead-of-path-in-type.rs:6:12 | LL | let _: Vec = A::B; diff --git a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs index 8b6e8cfd720..ed262fd39a5 100644 --- a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs +++ b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.rs @@ -6,7 +6,7 @@ pub trait T { pub struct Foo { i: Box>, //~^ ERROR must be specified - //~| ERROR this trait takes 2 generic arguments but 4 generic arguments were supplied + //~| ERROR trait takes 2 generic arguments but 4 generic arguments were supplied } diff --git a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr index 75b91923284..175a5fbba61 100644 --- a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr +++ b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 2 generic arguments but 4 generic arguments were supplied +error[E0107]: trait takes 2 generic arguments but 4 generic arguments were supplied --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16 | LL | i: Box>, diff --git a/tests/ui/traits/object/vs-lifetime.rs b/tests/ui/traits/object/vs-lifetime.rs index 14ae67cffd7..d3e6c0b217c 100644 --- a/tests/ui/traits/object/vs-lifetime.rs +++ b/tests/ui/traits/object/vs-lifetime.rs @@ -9,8 +9,8 @@ fn main() { let _: S<'static, dyn 'static +>; //~^ at least one trait is required for an object type let _: S<'static, 'static>; - //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied - //~| ERROR this struct takes 1 generic argument but 0 generic arguments were supplied + //~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied + //~| ERROR struct takes 1 generic argument but 0 generic arguments were supplied let _: S; //~^ ERROR type provided when a lifetime was expected //~| ERROR at least one trait is required for an object type diff --git a/tests/ui/traits/object/vs-lifetime.stderr b/tests/ui/traits/object/vs-lifetime.stderr index 22446522852..a69cd140807 100644 --- a/tests/ui/traits/object/vs-lifetime.stderr +++ b/tests/ui/traits/object/vs-lifetime.stderr @@ -4,7 +4,7 @@ error[E0224]: at least one trait is required for an object type LL | let _: S<'static, dyn 'static +>; | ^^^^^^^^^^^^^ -error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied +error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied --> $DIR/vs-lifetime.rs:11:12 | LL | let _: S<'static, 'static>; @@ -18,7 +18,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` LL | struct S<'a, T>(&'a u8, T); | ^ -- -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/vs-lifetime.rs:11:12 | LL | let _: S<'static, 'static>; diff --git a/tests/ui/traits/test-2.rs b/tests/ui/traits/test-2.rs index 3fb0cec6a3b..ffb778a0141 100644 --- a/tests/ui/traits/test-2.rs +++ b/tests/ui/traits/test-2.rs @@ -7,9 +7,9 @@ impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah(&self) {} } fn main() { 10.dup::(); - //~^ ERROR this method takes 0 generic arguments but 1 + //~^ ERROR method takes 0 generic arguments but 1 10.blah::(); - //~^ ERROR this method takes 1 generic argument but 2 + //~^ ERROR method takes 1 generic argument but 2 (Box::new(10) as Box).dup(); //~^ ERROR E0038 //~| ERROR E0038 diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr index 2219ba9c333..6c0e8b8af4b 100644 --- a/tests/ui/traits/test-2.stderr +++ b/tests/ui/traits/test-2.stderr @@ -1,4 +1,4 @@ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/test-2.rs:9:8 | LL | 10.dup::(); @@ -12,7 +12,7 @@ note: method defined here, with 0 generic parameters LL | trait bar { fn dup(&self) -> Self; fn blah(&self); } | ^^^ -error[E0107]: this method takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied --> $DIR/test-2.rs:11:8 | LL | 10.blah::(); diff --git a/tests/ui/transmutability/issue-101739-2.rs b/tests/ui/transmutability/issue-101739-2.rs index 964a7e49ee6..e5a56ccc9e0 100644 --- a/tests/ui/transmutability/issue-101739-2.rs +++ b/tests/ui/transmutability/issue-101739-2.rs @@ -15,7 +15,7 @@ mod assert { const ASSUME_VISIBILITY: bool, >() where - Dst: BikeshedIntrinsicFrom< //~ ERROR this trait takes at most 3 generic arguments but 6 generic arguments were supplied + Dst: BikeshedIntrinsicFrom< //~ ERROR trait takes at most 3 generic arguments but 6 generic arguments were supplied Src, Context, ASSUME_ALIGNMENT, diff --git a/tests/ui/transmutability/issue-101739-2.stderr b/tests/ui/transmutability/issue-101739-2.stderr index 1b3d202590d..420a9f33008 100644 --- a/tests/ui/transmutability/issue-101739-2.stderr +++ b/tests/ui/transmutability/issue-101739-2.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes at most 3 generic arguments but 6 generic arguments were supplied +error[E0107]: trait takes at most 3 generic arguments but 6 generic arguments were supplied --> $DIR/issue-101739-2.rs:18:14 | LL | Dst: BikeshedIntrinsicFrom< diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.rs b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.rs index 0031a4665c8..759a7fd7e05 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.rs +++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.rs @@ -62,10 +62,10 @@ fn main() { AliasFixed::TSVariant::<()>(()); //~^ ERROR type arguments are not allowed on this type [E0109] AliasFixed::<()>::TSVariant(()); - //~^ ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~^ ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] AliasFixed::<()>::TSVariant::<()>(()); //~^ ERROR type arguments are not allowed on this type [E0109] - //~| ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~| ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] // Struct variant @@ -80,10 +80,10 @@ fn main() { AliasFixed::SVariant::<()> { v: () }; //~^ ERROR type arguments are not allowed on this type [E0109] AliasFixed::<()>::SVariant { v: () }; - //~^ ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~^ ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] AliasFixed::<()>::SVariant::<()> { v: () }; //~^ ERROR type arguments are not allowed on this type [E0109] - //~| ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~| ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] // Unit variant @@ -98,8 +98,8 @@ fn main() { AliasFixed::UVariant::<()>; //~^ ERROR type arguments are not allowed on this type [E0109] AliasFixed::<()>::UVariant; - //~^ ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~^ ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] AliasFixed::<()>::UVariant::<()>; //~^ ERROR type arguments are not allowed on this type [E0109] - //~| ERROR this type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] + //~| ERROR type alias takes 0 generic arguments but 1 generic argument was supplied [E0107] } diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr index a922d7a5e41..758ff31ff70 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr +++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr @@ -304,7 +304,7 @@ LL | AliasFixed::TSVariant::<()>(()); | | | not allowed on this type -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:64:5 | LL | AliasFixed::<()>::TSVariant(()); @@ -318,7 +318,7 @@ note: type alias defined here, with 0 generic parameters LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:66:5 | LL | AliasFixed::<()>::TSVariant::<()>(()); @@ -395,7 +395,7 @@ LL - AliasFixed::SVariant::<()> { v: () }; LL + AliasFixed::<()>::SVariant { v: () }; | -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:82:5 | LL | AliasFixed::<()>::SVariant { v: () }; @@ -409,7 +409,7 @@ note: type alias defined here, with 0 generic parameters LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:84:5 | LL | AliasFixed::<()>::SVariant::<()> { v: () }; @@ -470,7 +470,7 @@ LL | AliasFixed::UVariant::<()>; | | | not allowed on this type -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:100:5 | LL | AliasFixed::<()>::UVariant; @@ -484,7 +484,7 @@ note: type alias defined here, with 0 generic parameters LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/enum-variant-generic-args.rs:102:5 | LL | AliasFixed::<()>::UVariant::<()>; diff --git a/tests/ui/typeck/issue-75883.rs b/tests/ui/typeck/issue-75883.rs index 885acc48231..c50ea0a086b 100644 --- a/tests/ui/typeck/issue-75883.rs +++ b/tests/ui/typeck/issue-75883.rs @@ -4,7 +4,7 @@ pub struct UI {} impl UI { pub fn run() -> Result<_> { - //~^ ERROR: this enum takes 2 generic arguments but 1 generic argument was supplied + //~^ ERROR: enum takes 2 generic arguments but 1 generic argument was supplied //~| ERROR: the placeholder `_` is not allowed within types on item signatures for return types let mut ui = UI {}; ui.interact(); @@ -13,7 +13,7 @@ impl UI { } pub fn interact(&mut self) -> Result<_> { - //~^ ERROR: this enum takes 2 generic arguments but 1 generic argument was supplied + //~^ ERROR: enum takes 2 generic arguments but 1 generic argument was supplied //~| ERROR: the placeholder `_` is not allowed within types on item signatures for return types unimplemented!(); } diff --git a/tests/ui/typeck/issue-75883.stderr b/tests/ui/typeck/issue-75883.stderr index f5adcabe3e9..a1ed0840675 100644 --- a/tests/ui/typeck/issue-75883.stderr +++ b/tests/ui/typeck/issue-75883.stderr @@ -1,4 +1,4 @@ -error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/issue-75883.rs:6:21 | LL | pub fn run() -> Result<_> { @@ -11,7 +11,7 @@ help: add missing generic argument LL | pub fn run() -> Result<_, E> { | +++ -error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied +error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied --> $DIR/issue-75883.rs:15:35 | LL | pub fn interact(&mut self) -> Result<_> { diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs index c463a8ad0c7..7ff9199f63c 100644 --- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs +++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs @@ -1,17 +1,17 @@ fn foo1, U>(x: T) {} -//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied +//~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied trait Trait: Copy {} -//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied +//~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied struct MyStruct1>; -//~^ ERROR this trait takes 0 generic arguments but 1 generic argument was supplied +//~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied struct MyStruct2<'a, T: Copy<'a>>; -//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied +//~^ ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} -//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied -//~| ERROR this trait takes 0 generic arguments but 1 generic argument was supplied +//~^ ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied +//~| ERROR trait takes 0 generic arguments but 1 generic argument was supplied fn main() { } diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr index 331540d1e42..a71fd953658 100644 --- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr +++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:1:11 | LL | fn foo1, U>(x: T) {} @@ -6,7 +6,7 @@ LL | fn foo1, U>(x: T) {} | | | expected 0 generic arguments -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14 | LL | trait Trait: Copy {} @@ -14,7 +14,7 @@ LL | trait Trait: Copy {} | | | expected 0 generic arguments -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:7:21 | LL | struct MyStruct1>; @@ -22,7 +22,7 @@ LL | struct MyStruct1>; | | | expected 0 generic arguments -error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:10:25 | LL | struct MyStruct2<'a, T: Copy<'a>>; @@ -30,7 +30,7 @@ LL | struct MyStruct2<'a, T: Copy<'a>>; | | | expected 0 lifetime arguments -error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied +error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15 | LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} @@ -38,7 +38,7 @@ LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | | | expected 0 lifetime arguments -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15 | LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.rs b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.rs index 43e46c5b6c3..90b12ffdf77 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.rs +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.rs @@ -7,5 +7,5 @@ struct Foo<'a, T:'a> { pub fn main() { let c: Foo<_, _> = Foo { r: &5 }; - //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied + //~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied } diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr index a89c6b85c78..c4e4aed2067 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12 | LL | let c: Foo<_, _> = Foo { r: &5 }; diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.rs b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.rs index 178b8b1229a..e361312ddba 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.rs +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.rs @@ -7,5 +7,5 @@ struct Foo<'a, T:'a> { pub fn main() { let c: Foo<_, usize> = Foo { r: &5 }; - //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied + //~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied } diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr index f30766bdf01..302231777bd 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12 | LL | let c: Foo<_, usize> = Foo { r: &5 }; diff --git a/tests/ui/ufcs/ufcs-qpath-missing-params.rs b/tests/ui/ufcs/ufcs-qpath-missing-params.rs index a110bec4c0f..6ab6580c0e6 100644 --- a/tests/ui/ufcs/ufcs-qpath-missing-params.rs +++ b/tests/ui/ufcs/ufcs-qpath-missing-params.rs @@ -15,6 +15,6 @@ fn main() { //~^ ERROR missing generics for ::into_cow::("foo".to_string()); - //~^ ERROR this method takes 0 generic arguments but 1 + //~^ ERROR method takes 0 generic arguments but 1 //~| ERROR missing generics for } diff --git a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr index ace1c36d674..2338871218b 100644 --- a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr +++ b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr @@ -30,7 +30,7 @@ help: add missing generic argument LL | >::into_cow::("foo".to_string()); | +++ -error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied --> $DIR/ufcs-qpath-missing-params.rs:17:26 | LL | ::into_cow::("foo".to_string()); diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs index 65f40075bd8..c575f507704 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.rs @@ -28,7 +28,7 @@ fn test<'a,'b>() { } fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) { - //~^ ERROR this trait takes 1 lifetime argument but 0 lifetime arguments were supplied + //~^ ERROR trait takes 1 lifetime argument but 0 lifetime arguments were supplied // Here, the omitted lifetimes are expanded to distinct things. same_type(x, y) } diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr index 016fc4dfb24..8814617814c 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-region.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 1 lifetime argument but 0 lifetime arguments were supplied +error[E0107]: trait takes 1 lifetime argument but 0 lifetime arguments were supplied --> $DIR/unboxed-closure-sugar-region.rs:30:51 | LL | fn test2(x: &dyn Foo<(isize,),Output=()>, y: &dyn Foo(isize)) { diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs index 462f6fb7b87..14d5646b508 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs @@ -7,7 +7,7 @@ struct Bar { fn bar() { let x: Box = panic!(); //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait - //~| ERROR this struct takes 1 generic argument but 0 generic arguments + //~| ERROR struct takes 1 generic argument but 0 generic arguments } fn main() { } diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr index 29ea5735cad..27b22c2127b 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr @@ -4,7 +4,7 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait LL | let x: Box = panic!(); | ^^^^^ only `Fn` traits may use parentheses -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16 | LL | let x: Box = panic!(); diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs index bd61cbd8022..657b29204cd 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs @@ -6,7 +6,7 @@ struct Bar { fn foo(b: Box) { //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait - //~| ERROR this struct takes 1 generic argument but 0 generic arguments + //~| ERROR struct takes 1 generic argument but 0 generic arguments } fn main() { } diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr index 427ba3414f8..94e42a66c9e 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr @@ -4,7 +4,7 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait LL | fn foo(b: Box) { | ^^^^^ only `Fn` traits may use parentheses -error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied +error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15 | LL | fn foo(b: Box) { diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs index f26ad8e93a1..dd47ae73a38 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs @@ -3,7 +3,7 @@ trait Three { fn dummy(&self) -> (A,B,C); } fn foo(_: &dyn Three()) -//~^ ERROR this trait takes 3 generic arguments but 1 generic argument +//~^ ERROR trait takes 3 generic arguments but 1 generic argument //~| ERROR associated type `Output` not found {} diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr index ebaacf0a698..5d7fe3fa533 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 3 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 3 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:16 | LL | fn foo(_: &dyn Three()) diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs index 4465b43a757..2c7e12f3257 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs @@ -3,25 +3,25 @@ trait Zero { fn dummy(&self); } fn foo1(_: dyn Zero()) { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| ERROR associated type `Output` not found for `Zero` } fn foo2(_: dyn Zero) { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument } fn foo3(_: dyn Zero < usize >) { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument } fn foo4(_: dyn Zero(usize)) { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| ERROR associated type `Output` not found for `Zero` } fn foo5(_: dyn Zero ( usize )) { - //~^ ERROR this trait takes 0 generic arguments but 1 generic argument + //~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| ERROR associated type `Output` not found for `Zero` } diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr index 9601e64c189..50b90553aa7 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:16 | LL | fn foo1(_: dyn Zero()) { @@ -18,7 +18,7 @@ error[E0220]: associated type `Output` not found for `Zero` LL | fn foo1(_: dyn Zero()) { | ^^^^^^ associated type `Output` not found -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:16 | LL | fn foo2(_: dyn Zero) { @@ -32,7 +32,7 @@ note: trait defined here, with 0 generic parameters LL | trait Zero { fn dummy(&self); } | ^^^^ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:16 | LL | fn foo3(_: dyn Zero < usize >) { @@ -46,7 +46,7 @@ note: trait defined here, with 0 generic parameters LL | trait Zero { fn dummy(&self); } | ^^^^ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:16 | LL | fn foo4(_: dyn Zero(usize)) { @@ -66,7 +66,7 @@ error[E0220]: associated type `Output` not found for `Zero` LL | fn foo4(_: dyn Zero(usize)) { | ^^^^^^^^^^^ associated type `Output` not found -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:16 | LL | fn foo5(_: dyn Zero ( usize )) { diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs index 4bcf90552f9..ad60b0a0c77 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs @@ -3,7 +3,7 @@ trait Trait {} fn f isize>(x: F) {} -//~^ ERROR this trait takes 0 generic arguments but 1 generic argument +//~^ ERROR trait takes 0 generic arguments but 1 generic argument //~| ERROR associated type `Output` not found for `Trait` fn main() {} diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr index 3ff05fb2331..130b193d69c 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr @@ -1,4 +1,4 @@ -error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8 | LL | fn f isize>(x: F) {}