diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-05 01:28:24 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-22 22:04:49 +0000 |
| commit | 5c2b36a21cabafb1f08e278f4c6ed61753a654cf (patch) | |
| tree | 922c29165702f2010839dccdcfc00b48dcbe7b05 | |
| parent | c807ac034089e31364baa24e19d5d61cbb657989 (diff) | |
| download | rust-5c2b36a21cabafb1f08e278f4c6ed61753a654cf.tar.gz rust-5c2b36a21cabafb1f08e278f4c6ed61753a654cf.zip | |
Change suggestion message wording
57 files changed, 163 insertions, 165 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs index c2d5627f2b0..6c2ec1acdf9 100644 --- a/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/errors/wrong_number_of_generic_args.rs @@ -947,8 +947,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { let num_redundant_lt_args = lt_arg_spans.len() - self.num_expected_lifetime_args(); let msg_lifetimes = format!( - "remove {these} lifetime argument{s}", - these = pluralize!("this", num_redundant_lt_args), + "remove the lifetime argument{s}", s = pluralize!(num_redundant_lt_args), ); @@ -989,8 +988,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { let num_redundant_gen_args = gen_arg_spans.len() - self.num_expected_type_or_const_args(); let msg_types_or_consts = format!( - "remove {these} generic argument{s}", - these = pluralize!("this", num_redundant_gen_args), + "remove the unnecessary generic argument{s}", s = pluralize!(num_redundant_gen_args), ); @@ -1036,7 +1034,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> { .with_lo(self.path_segment.ident.span.hi()); let msg = format!( - "remove these {}generics", + "remove the unnecessary {}generics", if self.gen_args.parenthesized == hir::GenericArgsParentheses::ParenSugar { "parenthetical " } else { diff --git a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr index ff73d3d5ddd..755a0bba508 100644 --- a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr +++ b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr @@ -25,7 +25,7 @@ note: associated type defined here, with 0 generic parameters | LL | type Y<'a>; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {} @@ -60,7 +60,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {} @@ -95,7 +95,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f<'a>(arg : Box<dyn X<Y = &'a ()>>) {} diff --git a/tests/rustdoc-ui/mismatched_arg_count.stderr b/tests/rustdoc-ui/mismatched_arg_count.stderr index c58ff7a14df..8e7def04f52 100644 --- a/tests/rustdoc-ui/mismatched_arg_count.stderr +++ b/tests/rustdoc-ui/mismatched_arg_count.stderr @@ -9,7 +9,7 @@ note: type alias defined here, with 1 lifetime parameter: `'a` | LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc; | ^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} LL + fn bar<'a, T: Trait<'a>>(_: Alias<'a, , T>) {} diff --git a/tests/ui/argument-suggestions/issue-100154.stderr b/tests/ui/argument-suggestions/issue-100154.stderr index 1496d994ef3..8a650099b81 100644 --- a/tests/ui/argument-suggestions/issue-100154.stderr +++ b/tests/ui/argument-suggestions/issue-100154.stderr @@ -10,7 +10,7 @@ note: function defined here, with 0 generic parameters LL | fn foo(i: impl std::fmt::Display) {} | ^^^ = note: `impl Trait` cannot be explicitly specified as a generic argument -help: remove these generics +help: remove the unnecessary generics | LL - foo::<()>(()); LL + foo(()); 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 c50e3fb6405..aaca4dc91c9 100644 --- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr +++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr @@ -9,7 +9,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct LockedMarket<T>(T); | ^^^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> { LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket { @@ -43,7 +43,7 @@ note: struct defined here, with 0 lifetime parameters LL | struct LockedMarket<T>(T); | ^^^^^^^^^^^^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> { LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket { diff --git a/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr b/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr index 91a1053bb6d..3f32b0eb674 100644 --- a/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr +++ b/tests/ui/const-generics/adt_const_params/transmutable-ice-110969.stderr @@ -4,7 +4,7 @@ error[E0107]: trait takes at most 2 generic arguments but 3 generic arguments we LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>, | ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments | -help: remove this generic argument +help: remove the unnecessary generic argument | LL - Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>, LL + Dst: BikeshedIntrinsicFrom<Src, Context, >, diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr index f891bbea21e..d8e794a7a65 100644 --- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr +++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr @@ -30,7 +30,7 @@ note: struct defined here, with 2 generic parameters: `T`, `N` | LL | struct All<'a, T, const N: usize> { | ^^^ - -------------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let a: All<_, _, _>; LL + let a: All<_, _, >; diff --git a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr index 78d32b57f87..a7232ef780e 100644 --- a/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr +++ b/tests/ui/const-generics/generic_const_exprs/const_kind_expr/issue_114151.stderr @@ -9,7 +9,7 @@ note: function defined here, with 1 generic parameter: `N` | LL | fn foo<const N: usize>( | ^^^ -------------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - foo::<_, L>([(); L + 1 + L]); LL + foo::<_, >([(); L + 1 + L]); 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 6bd6eb4e00e..41621911752 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-102768.stderr @@ -25,7 +25,7 @@ note: associated type defined here, with 0 generic parameters | LL | type Y<'a>; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {} @@ -60,7 +60,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {} @@ -95,7 +95,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg: Box<dyn X<Y = &'a ()>>) {} 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 97eb47275c2..05c4a0a1a72 100644 --- a/tests/ui/const-generics/incorrect-number-of-const-args.stderr +++ b/tests/ui/const-generics/incorrect-number-of-const-args.stderr @@ -27,7 +27,7 @@ note: function defined here, with 2 generic parameters: `X`, `Y` | LL | fn foo<const X: usize, const Y: usize>() -> usize { | ^^^ -------------- -------------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - foo::<0, 0, 0>(); LL + foo::<0, 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 d4f899f8377..dadb6734331 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 @@ -8,7 +8,7 @@ help: consider moving this generic argument to the `TryInto` trait, which takes | LL | let _: u32 = TryInto::<32>::try_into(5i32).unwrap(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -help: remove these generics +help: remove the unnecessary generics | LL - let _: u32 = 5i32.try_into::<32>().unwrap(); LL + let _: u32 = 5i32.try_into().unwrap(); @@ -34,7 +34,7 @@ note: struct defined here, with 0 generic parameters | LL | struct S; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - S::<0>; LL + S; diff --git a/tests/ui/const-generics/invalid-constant-in-args.stderr b/tests/ui/const-generics/invalid-constant-in-args.stderr index ed715257ac1..10334e0d896 100644 --- a/tests/ui/const-generics/invalid-constant-in-args.stderr +++ b/tests/ui/const-generics/invalid-constant-in-args.stderr @@ -4,7 +4,7 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl LL | let _: Cell<&str, "a"> = Cell::new(""); | ^^^^ expected 1 generic argument | -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let _: Cell<&str, "a"> = Cell::new(""); LL + let _: Cell<&str, > = Cell::new(""); diff --git a/tests/ui/constructor-lifetime-args.stderr b/tests/ui/constructor-lifetime-args.stderr index 9e0bc3c6c1a..37b13cd048f 100644 --- a/tests/ui/constructor-lifetime-args.stderr +++ b/tests/ui/constructor-lifetime-args.stderr @@ -27,7 +27,7 @@ note: struct defined here, with 2 lifetime parameters: `'a`, `'b` | LL | struct S<'a, 'b>(&'a u8, &'b u8); | ^ -- -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - S::<'static, 'static, 'static>(&0, &0); LL + S::<'static, 'static, >(&0, &0); @@ -62,7 +62,7 @@ note: enum defined here, with 2 lifetime parameters: `'a`, `'b` | LL | enum E<'a, 'b> { | ^ -- -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - E::V::<'static, 'static, 'static>(&0); LL + E::V::<'static, 'static, >(&0); diff --git a/tests/ui/consts/effect_param.stderr b/tests/ui/consts/effect_param.stderr index 3777e20e4c0..fafc20b4192 100644 --- a/tests/ui/consts/effect_param.stderr +++ b/tests/ui/consts/effect_param.stderr @@ -4,7 +4,7 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli LL | i8::checked_sub::<false>(42, 43); | ^^^^^^^^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - i8::checked_sub::<false>(42, 43); LL + i8::checked_sub(42, 43); @@ -16,7 +16,7 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli LL | i8::checked_sub::<true>(42, 43); | ^^^^^^^^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - i8::checked_sub::<true>(42, 43); LL + i8::checked_sub(42, 43); @@ -28,7 +28,7 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli LL | i8::checked_sub::<true>(42, 43); | ^^^^^^^^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - i8::checked_sub::<true>(42, 43); LL + i8::checked_sub(42, 43); @@ -40,7 +40,7 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli LL | i8::checked_sub::<false>(42, 43); | ^^^^^^^^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - i8::checked_sub::<false>(42, 43); LL + i8::checked_sub(42, 43); diff --git a/tests/ui/error-codes/E0107.rs b/tests/ui/error-codes/E0107.rs index fd23e7c00f2..161360a5012 100644 --- a/tests/ui/error-codes/E0107.rs +++ b/tests/ui/error-codes/E0107.rs @@ -16,35 +16,35 @@ struct Baz<'a, 'b, 'c> { bar: Bar<'a>, //~^ ERROR enum takes 0 lifetime arguments - //~| HELP remove these generics + //~| HELP remove the unnecessary generics foo2: Foo<'a, 'b, 'c>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove these lifetime arguments + //~| HELP remove the lifetime arguments qux1: Qux<'a, 'b, i32>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove this lifetime argument + //~| HELP remove the lifetime argument qux2: Qux<'a, i32, 'b>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove this lifetime argument + //~| HELP remove the lifetime argument qux3: Qux<'a, 'b, 'c, i32>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove these lifetime arguments + //~| HELP remove the lifetime arguments qux4: Qux<'a, i32, 'b, 'c>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove these lifetime arguments + //~| HELP remove the lifetime arguments qux5: Qux<'a, 'b, i32, 'c>, //~^ ERROR struct takes 1 lifetime argument - //~| HELP remove this lifetime argument + //~| HELP remove the lifetime argument quux: Quux<'a, i32, 'b>, //~^ ERROR struct takes 0 lifetime arguments - //~| HELP remove this lifetime argument + //~| HELP remove the lifetime argument } pub trait T { diff --git a/tests/ui/error-codes/E0107.stderr b/tests/ui/error-codes/E0107.stderr index c6317270f9b..d8bd96e0ad4 100644 --- a/tests/ui/error-codes/E0107.stderr +++ b/tests/ui/error-codes/E0107.stderr @@ -27,7 +27,7 @@ note: enum defined here, with 0 lifetime parameters | LL | enum Bar { | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - bar: Bar<'a>, LL + bar: Bar, @@ -44,7 +44,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Foo<'a>(&'a str); | ^^^ -- -help: remove these lifetime arguments +help: remove the lifetime arguments | LL - foo2: Foo<'a, 'b, 'c>, LL + foo2: Foo<'a, >, @@ -61,7 +61,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Qux<'a, T>(&'a T); | ^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - qux1: Qux<'a, 'b, i32>, LL + qux1: Qux<'a, , i32>, @@ -78,7 +78,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Qux<'a, T>(&'a T); | ^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - qux2: Qux<'a, i32, 'b>, LL + qux2: Qux<'a, i32, >, @@ -95,7 +95,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Qux<'a, T>(&'a T); | ^^^ -- -help: remove these lifetime arguments +help: remove the lifetime arguments | LL - qux3: Qux<'a, 'b, 'c, i32>, LL + qux3: Qux<'a, , i32>, @@ -112,7 +112,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Qux<'a, T>(&'a T); | ^^^ -- -help: remove these lifetime arguments +help: remove the lifetime arguments | LL - qux4: Qux<'a, i32, 'b, 'c>, LL + qux4: Qux<'a, i32, >, @@ -129,7 +129,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Qux<'a, T>(&'a T); | ^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - qux5: Qux<'a, 'b, i32, 'c>, LL + qux5: Qux<'a, , i32, 'c>, @@ -146,7 +146,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct Quux<T>(T); | ^^^^ -help: remove this lifetime argument +help: remove the lifetime argument | LL - quux: Quux<'a, i32, 'b>, LL + quux: Quux<, i32, 'b>, 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 18f37207ee5..252d81fa6f3 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 @@ -50,7 +50,7 @@ note: associated type defined here, with 0 generic parameters | LL | type Y<'a>; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {} @@ -85,7 +85,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {} @@ -120,7 +120,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL + fn foo<'a>(arg: Box<dyn X<Y = &'a ()>>) {} 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 9eb0b8ca641..7b7f21b00c5 100644 --- a/tests/ui/generic-associated-types/parameter_number_and_kind.stderr +++ b/tests/ui/generic-associated-types/parameter_number_and_kind.stderr @@ -9,7 +9,7 @@ note: associated type defined here, with 1 lifetime parameter: `'a` | LL | type E<'a, T>; | ^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type FErr1 = Self::E<'static, 'static>; LL + type FErr1 = Self::E<'static, >; @@ -42,7 +42,7 @@ note: associated type defined here, with 1 generic parameter: `T` | LL | type E<'a, T>; | ^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type FErr2<T> = Self::E<'static, T, u32>; LL + type FErr2<T> = Self::E<'static, T, >; 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 f73022922a5..6ea96b6228e 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 @@ -25,7 +25,7 @@ note: associated type defined here, with 0 generic parameters | LL | type Y<'a>; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {} @@ -60,7 +60,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {} @@ -95,7 +95,7 @@ note: associated type defined here, with 0 generic parameters LL | type Y<'a>; | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL + fn f2<'a>(arg : Box<dyn X<Y = &'a ()>>) {} diff --git a/tests/ui/generics/bad-mid-path-type-params.stderr b/tests/ui/generics/bad-mid-path-type-params.stderr index 7f4ba781e6a..ba1d48f1210 100644 --- a/tests/ui/generics/bad-mid-path-type-params.stderr +++ b/tests/ui/generics/bad-mid-path-type-params.stderr @@ -9,7 +9,7 @@ note: associated function defined here, with 1 generic parameter: `U` | LL | fn new<U>(x: T, _: U) -> S<T> { | ^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let _ = S::new::<isize,f64>(1, 1.0); LL + let _ = S::new::<isize,>(1, 1.0); @@ -26,7 +26,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct S<T> { | ^ -help: remove this lifetime argument +help: remove the lifetime argument | LL - let _ = S::<'a,isize>::new::<f64>(1, 1.0); LL + let _ = S::<,isize>::new::<f64>(1, 1.0); @@ -43,7 +43,7 @@ note: associated function defined here, with 1 generic parameter: `U` | LL | fn new<U>(x: T, y: U) -> Self; | ^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let _: S2 = Trait::new::<isize,f64>(1, 1.0); LL + let _: S2 = Trait::new::<isize,>(1, 1.0); @@ -60,7 +60,7 @@ note: trait defined here, with 0 lifetime parameters | LL | trait Trait<T> { | ^^^^^ -help: remove this lifetime argument +help: remove the lifetime argument | LL - let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); LL + let _: S2 = Trait::<,isize>::new::<f64,f64>(1, 1.0); @@ -77,7 +77,7 @@ note: associated function defined here, with 1 generic parameter: `U` | LL | fn new<U>(x: T, y: U) -> Self; | ^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); LL + let _: S2 = Trait::<'a,isize>::new::<f64,>(1, 1.0); diff --git a/tests/ui/generics/foreign-generic-mismatch.stderr b/tests/ui/generics/foreign-generic-mismatch.stderr index 7e8e854d642..740963aeec5 100644 --- a/tests/ui/generics/foreign-generic-mismatch.stderr +++ b/tests/ui/generics/foreign-generic-mismatch.stderr @@ -27,7 +27,7 @@ note: function defined here, with 1 lifetime parameter: `'a` | LL | pub fn lt_arg<'a: 'a>() {} | ^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - foreign_generic_mismatch::lt_arg::<'static, 'static>(); LL + foreign_generic_mismatch::lt_arg::<'static, >(); diff --git a/tests/ui/generics/generic-arg-mismatch-recover.stderr b/tests/ui/generics/generic-arg-mismatch-recover.stderr index cb25fa7af40..e8c2a4665f3 100644 --- a/tests/ui/generics/generic-arg-mismatch-recover.stderr +++ b/tests/ui/generics/generic-arg-mismatch-recover.stderr @@ -9,7 +9,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Foo<'a, T: 'a>(&'a T); | ^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - Foo::<'static, 'static, ()>(&0); LL + Foo::<'static, , ()>(&0); @@ -26,7 +26,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Bar<'a>(&'a ()); | ^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - Bar::<'static, 'static, ()>(&()); LL + Bar::<'static, , ()>(&()); @@ -43,7 +43,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Bar<'a>(&'a ()); | ^^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - Bar::<'static, 'static, ()>(&()); LL + Bar::<'static, 'static, >(&()); 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 edbe7a5e139..b0973c477ff 100644 --- a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr +++ b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr @@ -9,7 +9,7 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A` | LL | struct Vec<T, A = Heap>( | ^^^ - -------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - Vec::<isize, Heap, bool>::new(); LL + Vec::<isize, Heap, >::new(); 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 27752af1ad6..e83a433b060 100644 --- a/tests/ui/generics/generic-type-more-params-with-defaults.stderr +++ b/tests/ui/generics/generic-type-more-params-with-defaults.stderr @@ -9,7 +9,7 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A` | LL | struct Vec<T, A = Heap>( | ^^^ - -------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let _: Vec<isize, Heap, bool>; LL + let _: Vec<isize, Heap, >; diff --git a/tests/ui/generics/wrong-number-of-args.rs b/tests/ui/generics/wrong-number-of-args.rs index 95463d1c32c..6524bd538b6 100644 --- a/tests/ui/generics/wrong-number-of-args.rs +++ b/tests/ui/generics/wrong-number-of-args.rs @@ -5,19 +5,19 @@ mod no_generics { type B = Ty<'static>; //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument - //~| HELP remove these generics + //~| HELP remove the unnecessary generics type C = Ty<'static, usize>; //~^ 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 + //~| HELP remove the lifetime argument + //~| HELP remove the unnecessary generic argument type D = Ty<'static, usize, { 0 }>; //~^ 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 + //~| HELP remove the lifetime argument + //~| HELP remove the unnecessary generic arguments } mod type_and_type { @@ -35,7 +35,7 @@ mod type_and_type { type D = Ty<usize, String, char>; //~^ ERROR struct takes 2 generic arguments but 3 generic arguments - //~| HELP remove this + //~| HELP remove the type E = Ty<>; //~^ ERROR struct takes 2 generic arguments but 0 generic arguments were supplied @@ -70,8 +70,8 @@ mod lifetime_and_type { type F = Ty<'static, usize, 'static, usize>; //~^ 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 + //~| HELP remove the lifetime argument + //~| HELP remove the unnecessary generic argument } mod type_and_type_and_type { @@ -317,13 +317,13 @@ mod stdlib { type C = HashMap<'static>; //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument - //~| HELP remove these generics + //~| HELP remove the //~| ERROR struct takes at least 2 //~| HELP add missing type D = HashMap<usize, String, char, f64>; //~^ ERROR struct takes at most 3 - //~| HELP remove this + //~| HELP remove the type E = HashMap<>; //~^ ERROR struct takes at least 2 generic arguments but 0 generic arguments @@ -341,7 +341,7 @@ mod stdlib { type C = Result<'static>; //~^ ERROR enum takes 0 lifetime arguments but 1 lifetime argument - //~| HELP remove these generics + //~| HELP remove the unnecessary generics //~| 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 9df759bf29b..1363032ad14 100644 --- a/tests/ui/generics/wrong-number-of-args.stderr +++ b/tests/ui/generics/wrong-number-of-args.stderr @@ -178,7 +178,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct Ty; | ^^ -help: remove these generics +help: remove the unnecessary generics | LL - type B = Ty<'static>; LL + type B = Ty; @@ -195,7 +195,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct Ty; | ^^ -help: remove this lifetime argument +help: remove the lifetime argument | LL - type C = Ty<'static, usize>; LL + type C = Ty<, usize>; @@ -212,7 +212,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Ty; | ^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type C = Ty<'static, usize>; LL + type C = Ty<'static, >; @@ -229,7 +229,7 @@ note: struct defined here, with 0 lifetime parameters | LL | struct Ty; | ^^ -help: remove this lifetime argument +help: remove the lifetime argument | LL - type D = Ty<'static, usize, { 0 }>; LL + type D = Ty<, usize, { 0 }>; @@ -246,7 +246,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Ty; | ^^ -help: remove these generic arguments +help: remove the unnecessary generic arguments | LL - type D = Ty<'static, usize, { 0 }>; LL + type D = Ty<'static, >; @@ -297,7 +297,7 @@ note: struct defined here, with 2 generic parameters: `A`, `B` | LL | struct Ty<A, B>(A, B); | ^^ - - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type D = Ty<usize, String, char>; LL + type D = Ty<usize, String, >; @@ -378,7 +378,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct Ty<'a, T>(&'a T); | ^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type F = Ty<'static, usize, 'static, usize>; LL + type F = Ty<'static, usize, , usize>; @@ -395,7 +395,7 @@ note: struct defined here, with 1 generic parameter: `T` | LL | struct Ty<'a, T>(&'a T); | ^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type F = Ty<'static, usize, 'static, usize>; LL + type F = Ty<'static, usize, 'static, >; @@ -446,7 +446,7 @@ note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C` | LL | struct Ty<A, B, C = &'static str>(A, B, C); | ^^ - - ---------------- -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type E = Ty<usize, String, char, f64>; LL + type E = Ty<usize, String, char, >; @@ -479,7 +479,7 @@ note: trait defined here, with 0 generic parameters | LL | trait NonGeneric { | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - type A = Box<dyn NonGeneric<usize>>; LL + type A = Box<dyn NonGeneric>; @@ -496,7 +496,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` | LL | trait GenericLifetime<'a> { | ^^^^^^^^^^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type C = Box<dyn GenericLifetime<'static, 'static>>; LL + type C = Box<dyn GenericLifetime<'static, >>; @@ -529,7 +529,7 @@ note: trait defined here, with 1 generic parameter: `A` | LL | trait GenericType<A> { | ^^^^^^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type E = Box<dyn GenericType<String, usize>>; LL + type E = Box<dyn GenericType<String, >>; @@ -562,7 +562,7 @@ note: trait defined here, with 0 generic parameters | LL | trait NonGenericAT { | ^^^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - type A = Box<dyn NonGenericAT<usize, AssocTy=()>>; LL + type A = Box<dyn NonGenericAT>; @@ -579,7 +579,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` | LL | trait GenericLifetimeAT<'a> { | ^^^^^^^^^^^^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>; LL + type B = Box<dyn GenericLifetimeAT<'static, , AssocTy=()>>; @@ -596,7 +596,7 @@ note: trait defined here, with 0 generic parameters | LL | trait GenericLifetimeAT<'a> { | ^^^^^^^^^^^^^^^^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>; LL + type C = Box<dyn GenericLifetimeAT<, AssocTy=()>>; @@ -629,7 +629,7 @@ note: trait defined here, with 1 generic parameter: `A` | LL | trait GenericTypeAT<A> { | ^^^^^^^^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>; LL + type B = Box<dyn GenericTypeAT<(), , AssocTy=()>>; @@ -646,7 +646,7 @@ note: trait defined here, with 0 lifetime parameters | LL | trait GenericTypeAT<A> { | ^^^^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>; LL + type C = Box<dyn GenericTypeAT>; @@ -711,7 +711,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>; LL + type C = Box<dyn GenericLifetimeTypeAT<'static, , AssocTy=()>>; @@ -744,7 +744,7 @@ note: trait defined here, with 1 generic parameter: `A` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>; LL + type E = Box<dyn GenericLifetimeTypeAT<(), , AssocTy=()>>; @@ -761,7 +761,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>; LL + type F = Box<dyn GenericLifetimeTypeAT<'static, , (), AssocTy=()>>; @@ -778,7 +778,7 @@ note: trait defined here, with 1 generic parameter: `A` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>; LL + type G = Box<dyn GenericLifetimeTypeAT<'static, (), , AssocTy=()>>; @@ -795,7 +795,7 @@ note: trait defined here, with 1 lifetime parameter: `'a` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>; LL + type H = Box<dyn GenericLifetimeTypeAT<'static, , (), (), AssocTy=()>>; @@ -812,7 +812,7 @@ note: trait defined here, with 1 generic parameter: `A` | LL | trait GenericLifetimeTypeAT<'a, A> { | ^^^^^^^^^^^^^^^^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>; LL + type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), , AssocTy=()>>; @@ -863,7 +863,7 @@ note: trait defined here, with 2 generic parameters: `A`, `B` | LL | trait GenericTypeTypeAT<A, B> { | ^^^^^^^^^^^^^^^^^ - - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>; LL + type C = Box<dyn GenericTypeTypeAT<(), (), , AssocTy=()>>; @@ -985,7 +985,7 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp LL | type C = HashMap<'static>; | ^^^^^^^ expected 0 lifetime arguments | -help: remove these generics +help: remove the unnecessary generics | LL - type C = HashMap<'static>; LL + type C = HashMap; @@ -1008,7 +1008,7 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w LL | type D = HashMap<usize, String, char, f64>; | ^^^^^^^ expected at most 3 generic arguments | -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type D = HashMap<usize, String, char, f64>; LL + type D = HashMap<usize, String, char, >; @@ -1055,7 +1055,7 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli LL | type C = Result<'static>; | ^^^^^^ expected 0 lifetime arguments | -help: remove these generics +help: remove the unnecessary generics | LL - type C = Result<'static>; LL + type C = Result; @@ -1078,7 +1078,7 @@ error[E0107]: enum takes 2 generic arguments but 3 generic arguments were suppli LL | type D = Result<usize, String, char>; | ^^^^^^ expected 2 generic arguments | -help: remove this generic argument +help: remove the unnecessary generic argument | LL - type D = Result<usize, String, char>; LL + type D = Result<usize, String, >; 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 d184110c453..1c22e77e817 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 @@ -10,7 +10,7 @@ note: function defined here, with 1 generic parameter: `T` LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {} | ^^^ - = note: `impl Trait` cannot be explicitly specified as a generic argument -help: remove this generic argument +help: remove the unnecessary generic argument | LL - foo::<str, String>("".to_string()); LL + foo::<str, >("".to_string()); diff --git a/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr b/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr index aba82084f22..1802a22d6cf 100644 --- a/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr +++ b/tests/ui/impl-trait/in-trait/opaque-and-lifetime-mismatch.stderr @@ -45,7 +45,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Wrapper<'rom>(&'rom ()); | ^^^^^^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - fn bar() -> Wrapper<impl Sized>; LL + fn bar() -> Wrapper<>; @@ -62,7 +62,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Wrapper<'rom>(&'rom ()); | ^^^^^^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - fn foo() -> Wrapper<impl Sized>; LL + fn foo() -> Wrapper<>; @@ -106,7 +106,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Wrapper<'rom>(&'rom ()); | ^^^^^^^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - fn foo() -> Wrapper<impl Sized> { LL + fn foo() -> Wrapper<> { diff --git a/tests/ui/issues/issue-18423.stderr b/tests/ui/issues/issue-18423.stderr index a73688205ac..c1a4aacd2a5 100644 --- a/tests/ui/issues/issue-18423.stderr +++ b/tests/ui/issues/issue-18423.stderr @@ -4,7 +4,7 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp LL | x: Box<'a, isize> | ^^^ expected 0 lifetime arguments | -help: remove this lifetime argument +help: remove the lifetime argument | LL - x: Box<'a, isize> LL + x: Box<, isize> diff --git a/tests/ui/issues/issue-53251.stderr b/tests/ui/issues/issue-53251.stderr index db9df7d911c..854e9bc0c9b 100644 --- a/tests/ui/issues/issue-53251.stderr +++ b/tests/ui/issues/issue-53251.stderr @@ -13,7 +13,7 @@ note: associated function defined here, with 0 generic parameters LL | fn f() {} | ^ = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info) -help: remove these generics +help: remove the unnecessary generics | LL - S::f::<i64>(); LL + S::f(); @@ -35,7 +35,7 @@ LL | fn f() {} | ^ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info) -help: remove these generics +help: remove the unnecessary generics | LL - S::f::<i64>(); LL + S::f(); diff --git a/tests/ui/issues/issue-60622.stderr b/tests/ui/issues/issue-60622.stderr index e694a92213c..66e96131f5e 100644 --- a/tests/ui/issues/issue-60622.stderr +++ b/tests/ui/issues/issue-60622.stderr @@ -27,7 +27,7 @@ note: method defined here, with 0 generic parameters | LL | fn a(&self) {} | ^ -help: remove this generic argument +help: remove the unnecessary generic argument | LL - b.a::<'_, T>(); LL + b.a::<'_, >(); diff --git a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr index de0a0631bf8..02dbfca15a4 100644 --- a/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr +++ b/tests/ui/late-bound-lifetimes/mismatched_arg_count.stderr @@ -9,7 +9,7 @@ note: type alias defined here, with 1 lifetime parameter: `'a` | LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc; | ^^^^^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} LL + fn bar<'a, T: Trait<'a>>(_: Alias<'a, , T>) {} diff --git a/tests/ui/lifetimes/noisy-follow-up-erro.stderr b/tests/ui/lifetimes/noisy-follow-up-erro.stderr index 38465c7ac96..90dfc88e19f 100644 --- a/tests/ui/lifetimes/noisy-follow-up-erro.stderr +++ b/tests/ui/lifetimes/noisy-follow-up-erro.stderr @@ -9,7 +9,7 @@ note: struct defined here, with 2 lifetime parameters: `'c`, `'d` | LL | struct Foo<'c, 'd>(&'c (), &'d ()); | ^^^ -- -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> { LL + fn boom(&self, foo: &mut Foo<'_, '_, >) -> Result<(), &'a ()> { diff --git a/tests/ui/methods/method-call-lifetime-args-fail.stderr b/tests/ui/methods/method-call-lifetime-args-fail.stderr index d431e0721cc..60ef1060aac 100644 --- a/tests/ui/methods/method-call-lifetime-args-fail.stderr +++ b/tests/ui/methods/method-call-lifetime-args-fail.stderr @@ -27,7 +27,7 @@ note: method defined here, with 2 lifetime parameters: `'a`, `'b` | LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } | ^^^^^ -- -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - S.early::<'static, 'static, 'static>(); LL + S.early::<'static, 'static, >(); @@ -230,7 +230,7 @@ note: method defined here, with 2 lifetime parameters: `'a`, `'b` | LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } | ^^^^^ -- -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - S::early::<'static, 'static, 'static>(S); LL + S::early::<'static, 'static, >(S); diff --git a/tests/ui/resolve/issue-3214.stderr b/tests/ui/resolve/issue-3214.stderr index 614d3b21ff2..f6f8c3b7746 100644 --- a/tests/ui/resolve/issue-3214.stderr +++ b/tests/ui/resolve/issue-3214.stderr @@ -19,7 +19,7 @@ note: struct defined here, with 0 generic parameters | LL | struct Foo { | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - impl<T> Drop for Foo<T> { LL + impl<T> Drop for Foo { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr index 3d9df78b196..6945e8465da 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr @@ -9,7 +9,7 @@ note: function defined here, with 0 generic parameters | LL | pub const fn foo() {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - foo::<false>(); LL + foo(); @@ -42,7 +42,7 @@ note: function defined here, with 0 generic parameters | LL | pub const fn foo() {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - foo::<true>(); LL + foo(); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr index 8412a3d0a8a..0f9380de286 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr @@ -23,7 +23,7 @@ note: function defined here, with 0 generic parameters | LL | const fn foo() {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - foo::<false>(); LL + foo(); @@ -65,7 +65,7 @@ note: function defined here, with 0 generic parameters | LL | const fn foo() {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - foo::<true>(); LL + foo(); diff --git a/tests/ui/seq-args.stderr b/tests/ui/seq-args.stderr index bb46a11d902..47c5119b917 100644 --- a/tests/ui/seq-args.stderr +++ b/tests/ui/seq-args.stderr @@ -9,7 +9,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Seq { } | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - impl<T> Seq<T> for Vec<T> { LL + impl<T> Seq for Vec<T> { @@ -26,7 +26,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Seq { } | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - impl Seq<bool> for u32 { LL + impl Seq for u32 { diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr index edcb0bcc833..1a2a346b0e3 100644 --- a/tests/ui/structs/struct-path-associated-type.stderr +++ b/tests/ui/structs/struct-path-associated-type.stderr @@ -15,7 +15,7 @@ note: associated type defined here, with 0 generic parameters | LL | type A; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - let z = T::A::<u8> {}; LL + let z = T::A {}; @@ -44,7 +44,7 @@ note: associated type defined here, with 0 generic parameters | LL | type A; | ^ -help: remove these generics +help: remove the unnecessary generics | LL - let z = T::A::<u8> {}; LL + let z = T::A {}; diff --git a/tests/ui/structs/structure-constructor-type-mismatch.stderr b/tests/ui/structs/structure-constructor-type-mismatch.stderr index 50ebd86a216..60638125115 100644 --- a/tests/ui/structs/structure-constructor-type-mismatch.stderr +++ b/tests/ui/structs/structure-constructor-type-mismatch.stderr @@ -75,7 +75,7 @@ note: type alias defined here, with 0 generic parameters | LL | type PointF = Point<f32>; | ^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - let pt3 = PointF::<i32> { LL + let pt3 = PointF { @@ -114,7 +114,7 @@ note: type alias defined here, with 0 generic parameters | LL | type PointF = Point<f32>; | ^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - PointF::<u32> { .. } => {} LL + PointF { .. } => {} diff --git a/tests/ui/suggestions/issue-101421.stderr b/tests/ui/suggestions/issue-101421.stderr index 1a64f5313cf..7adf07aa531 100644 --- a/tests/ui/suggestions/issue-101421.stderr +++ b/tests/ui/suggestions/issue-101421.stderr @@ -9,7 +9,7 @@ note: method defined here, with 0 generic parameters | LL | fn f(&self, _: ()); | ^ -help: remove these generics +help: remove the unnecessary generics | LL - ().f::<()>(()); LL + ().f(()); diff --git a/tests/ui/suggestions/issue-104287.stderr b/tests/ui/suggestions/issue-104287.stderr index b65d3ad4d31..808f9562805 100644 --- a/tests/ui/suggestions/issue-104287.stderr +++ b/tests/ui/suggestions/issue-104287.stderr @@ -9,7 +9,7 @@ note: method defined here, with 0 generic parameters | LL | fn foo(&self) {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - foo::<()>(x); LL + foo(x); diff --git a/tests/ui/suggestions/issue-89064.rs b/tests/ui/suggestions/issue-89064.rs index fa5fc899dc0..014d15a87f1 100644 --- a/tests/ui/suggestions/issue-89064.rs +++ b/tests/ui/suggestions/issue-89064.rs @@ -16,20 +16,20 @@ impl<T, U> B<T, U> for S {} fn main() { let _ = A::foo::<S>(); //~^ ERROR - //~| HELP remove these generics + //~| HELP remove the unnecessary generics //~| HELP consider moving this generic argument let _ = B::bar::<S, S>(); //~^ ERROR - //~| HELP remove these generics + //~| HELP remove the unnecessary generics //~| HELP consider moving these generic arguments let _ = A::<S>::foo::<S>(); //~^ ERROR - //~| HELP remove these generics + //~| HELP remove the unnecessary generics let _ = 42.into::<Option<_>>(); //~^ ERROR - //~| HELP remove these generics + //~| HELP remove the unnecessary generics //~| HELP consider moving this generic argument } diff --git a/tests/ui/suggestions/issue-89064.stderr b/tests/ui/suggestions/issue-89064.stderr index f1bb3c2adc7..a64a1986af8 100644 --- a/tests/ui/suggestions/issue-89064.stderr +++ b/tests/ui/suggestions/issue-89064.stderr @@ -14,7 +14,7 @@ help: consider moving this generic argument to the `A` trait, which takes up to LL - let _ = A::foo::<S>(); LL + let _ = A::<S>::foo(); | -help: remove these generics +help: remove the unnecessary generics | LL - let _ = A::foo::<S>(); LL + let _ = A::foo(); @@ -36,7 +36,7 @@ help: consider moving these generic arguments to the `B` trait, which takes up t LL - let _ = B::bar::<S, S>(); LL + let _ = B::<S, S>::bar(); | -help: remove these generics +help: remove the unnecessary generics | LL - let _ = B::bar::<S, S>(); LL + let _ = B::bar(); @@ -53,7 +53,7 @@ note: associated function defined here, with 0 generic parameters | LL | fn foo() {} | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - let _ = A::<S>::foo::<S>(); LL + let _ = A::<S>::foo(); @@ -69,7 +69,7 @@ help: consider moving this generic argument to the `Into` trait, which takes up | LL | let _ = Into::<Option<_>>::into(42); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -help: remove these generics +help: remove the unnecessary generics | LL - let _ = 42.into::<Option<_>>(); LL + let _ = 42.into(); 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 4066cd3b11a..a719ddc4b16 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 @@ -14,5 +14,5 @@ fn main() { 1.bar::<i32>(0); //~^ 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 + //~| HELP remove the unnecessary 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 aa11bc7cf1d..cc735ef4c5e 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 @@ -13,7 +13,7 @@ help: consider moving this generic argument to the `Foo` trait, which takes up t | LL | Foo::<i32>::bar(1, 0); | ~~~~~~~~~~~~~~~~~~~~~ -help: remove these generics +help: remove the unnecessary generics | LL - 1.bar::<i32>(0); LL + 1.bar(0); diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr index 9193faeb1aa..5a54ca181ce 100644 --- a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr +++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr @@ -124,7 +124,7 @@ note: struct defined here, with 1 generic parameter: `T` | LL | struct Struct<T: Trait<u32, String>> { | ^^^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {} LL + impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, > {} diff --git a/tests/ui/traits/object/vs-lifetime.stderr b/tests/ui/traits/object/vs-lifetime.stderr index aab4845a274..e02c750055b 100644 --- a/tests/ui/traits/object/vs-lifetime.stderr +++ b/tests/ui/traits/object/vs-lifetime.stderr @@ -15,7 +15,7 @@ note: struct defined here, with 1 lifetime parameter: `'a` | LL | struct S<'a, T>(&'a u8, T); | ^ -- -help: remove this lifetime argument +help: remove the lifetime argument | LL - let _: S<'static, 'static>; LL + let _: S<'static, >; diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr index 9916cf97fca..d1a003aa3f4 100644 --- a/tests/ui/traits/test-2.stderr +++ b/tests/ui/traits/test-2.stderr @@ -9,7 +9,7 @@ note: method defined here, with 0 generic parameters | LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } | ^^^ -help: remove these generics +help: remove the unnecessary generics | LL - 10.dup::<i32>(); LL + 10.dup(); @@ -26,7 +26,7 @@ note: method defined here, with 1 generic parameter: `X` | LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } | ^^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - 10.blah::<i32, i32>(); LL + 10.blah::<i32, >(); diff --git a/tests/ui/transmutability/issue-101739-2.stderr b/tests/ui/transmutability/issue-101739-2.stderr index 93323049760..1f640f21ad1 100644 --- a/tests/ui/transmutability/issue-101739-2.stderr +++ b/tests/ui/transmutability/issue-101739-2.stderr @@ -4,7 +4,7 @@ error[E0107]: trait takes at most 2 generic arguments but 5 generic arguments we LL | Dst: BikeshedIntrinsicFrom< | ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments | -help: remove these generic arguments +help: remove the unnecessary generic arguments | LL - ASSUME_LIFETIMES, LL - ASSUME_VALIDITY, 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 a2dd6805f3d..aaed6a9b544 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 @@ -315,7 +315,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::TSVariant(()); LL + AliasFixed::TSVariant(()); @@ -332,7 +332,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::TSVariant::<()>(()); LL + AliasFixed::TSVariant::<()>(()); @@ -412,7 +412,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::SVariant { v: () }; LL + AliasFixed::SVariant { v: () }; @@ -429,7 +429,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::SVariant::<()> { v: () }; LL + AliasFixed::SVariant::<()> { v: () }; @@ -493,7 +493,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::UVariant; LL + AliasFixed::UVariant; @@ -510,7 +510,7 @@ note: type alias defined here, with 0 generic parameters | LL | type AliasFixed = Enum<()>; | ^^^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - AliasFixed::<()>::UVariant::<()>; LL + AliasFixed::UVariant::<()>; diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr index 3be83682ec9..dbcc03ee955 100644 --- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr +++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr @@ -4,7 +4,7 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie LL | fn foo1<T:Copy<U>, U>(x: T) {} | ^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - fn foo1<T:Copy<U>, U>(x: T) {} LL + fn foo1<T:Copy, U>(x: T) {} @@ -16,7 +16,7 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie LL | trait Trait: Copy<dyn Send> {} | ^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - trait Trait: Copy<dyn Send> {} LL + trait Trait: Copy {} @@ -29,7 +29,7 @@ LL | trait Trait: Copy<dyn Send> {} | ^^^^ expected 0 generic arguments | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - trait Trait: Copy<dyn Send> {} LL + trait Trait: Copy {} @@ -42,7 +42,7 @@ LL | trait Trait: Copy<dyn Send> {} | ^^^^ expected 0 generic arguments | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -help: remove these generics +help: remove the unnecessary generics | LL - trait Trait: Copy<dyn Send> {} LL + trait Trait: Copy {} @@ -54,7 +54,7 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie LL | struct MyStruct1<T: Copy<T>>(T); | ^^^^ expected 0 generic arguments | -help: remove these generics +help: remove the unnecessary generics | LL - struct MyStruct1<T: Copy<T>>(T); LL + struct MyStruct1<T: Copy>(T); @@ -66,7 +66,7 @@ error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was suppl LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T); | ^^^^ expected 0 lifetime arguments | -help: remove these generics +help: remove the unnecessary generics | LL - struct MyStruct2<'a, T: Copy<'a>>(&'a T); LL + struct MyStruct2<'a, T: Copy>(&'a T); @@ -78,7 +78,7 @@ error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was suppl LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^ expected 0 lifetime arguments | -help: remove this lifetime argument +help: remove the lifetime argument | LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} LL + fn foo2<'a, T:Copy<, U>, U>(x: T) {} @@ -90,7 +90,7 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} | ^^^^ expected 0 generic arguments | -help: remove this generic argument +help: remove the unnecessary generic argument | LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} LL + fn foo2<'a, T:Copy<'a, >, U>(x: T) {} diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr index 65f07bb0832..83679f4b1f6 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_1.stderr @@ -9,7 +9,7 @@ note: struct defined here, with 1 generic parameter: `T` | LL | struct Foo<'a, T:'a> { | ^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let c: Foo<_, _> = Foo { r: &5 }; LL + let c: Foo<_, > = Foo { r: &5 }; diff --git a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr index b07cc225ba8..8d519600edc 100644 --- a/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr +++ b/tests/ui/typeck/typeck_type_placeholder_lifetime_2.stderr @@ -9,7 +9,7 @@ note: struct defined here, with 1 generic parameter: `T` | LL | struct Foo<'a, T:'a> { | ^^^ - -help: remove this generic argument +help: remove the unnecessary generic argument | LL - let c: Foo<_, usize> = Foo { r: &5 }; LL + let c: Foo<_, > = Foo { r: &5 }; diff --git a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr index 0ae92d204b6..e7e576d7c66 100644 --- a/tests/ui/ufcs/ufcs-qpath-missing-params.stderr +++ b/tests/ui/ufcs/ufcs-qpath-missing-params.stderr @@ -41,7 +41,7 @@ note: method defined here, with 0 generic parameters | LL | fn into_cow(self) -> Cow<'a, B>; | ^^^^^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - <String as IntoCow>::into_cow::<str>("foo".to_string()); LL + <String as IntoCow>::into_cow("foo".to_string()); 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 ac56d1d05fa..50900973282 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 @@ -9,7 +9,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Zero { fn dummy(&self); } | ^^^^ -help: remove these parenthetical generics +help: remove the unnecessary parenthetical generics | LL - fn foo1(_: &dyn Zero()) { LL + fn foo1(_: &dyn Zero) { @@ -32,7 +32,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Zero { fn dummy(&self); } | ^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - fn foo2(_: &dyn Zero<usize>) { LL + fn foo2(_: &dyn Zero) { @@ -49,7 +49,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Zero { fn dummy(&self); } | ^^^^ -help: remove these generics +help: remove the unnecessary generics | LL - fn foo3(_: &dyn Zero < usize >) { LL + fn foo3(_: &dyn Zero) { @@ -66,7 +66,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Zero { fn dummy(&self); } | ^^^^ -help: remove these parenthetical generics +help: remove the unnecessary parenthetical generics | LL - fn foo4(_: &dyn Zero(usize)) { LL + fn foo4(_: &dyn Zero) { @@ -89,7 +89,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Zero { fn dummy(&self); } | ^^^^ -help: remove these parenthetical generics +help: remove the unnecessary parenthetical generics | LL - fn foo5(_: &dyn Zero ( usize )) { LL + fn foo5(_: &dyn Zero) { 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 3736f25a51f..aecfe502cf9 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr @@ -9,7 +9,7 @@ note: trait defined here, with 0 generic parameters | LL | trait Trait {} | ^^^^^ -help: remove these parenthetical generics +help: remove the unnecessary parenthetical generics | LL - fn f<F:Trait(isize) -> isize>(x: F) {} LL + fn f<F:Trait -> isize>(x: F) {} |
