Change suggestion message wording

This commit is contained in:
Esteban Küber 2024-07-05 01:28:24 +00:00
parent c807ac0340
commit 5c2b36a21c
57 changed files with 163 additions and 165 deletions

View file

@ -947,8 +947,7 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
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 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
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 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
.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 {

View file

@ -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 ()>>) {}

View file

@ -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>) {}

View file

@ -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(());

View file

@ -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 {

View file

@ -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, >,

View file

@ -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<_, _, >;

View file

@ -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]);

View file

@ -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 ()>>) {}

View file

@ -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, >();

View file

@ -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;

View file

@ -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("");

View file

@ -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);

View file

@ -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);

View file

@ -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 {

View file

@ -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>,

View file

@ -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 ()>>) {}

View file

@ -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, >;

View file

@ -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 ()>>) {}

View file

@ -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);

View file

@ -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, >();

View file

@ -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, >(&());

View file

@ -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();

View file

@ -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, >;

View file

@ -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 hash_map {
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 result {
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

View file

@ -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, >;

View file

@ -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());

View file

@ -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<> {

View file

@ -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>

View file

@ -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();

View file

@ -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::<'_, >();

View file

@ -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>) {}

View file

@ -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 ()> {

View file

@ -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);

View file

@ -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 {

View file

@ -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();

View file

@ -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();

View file

@ -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 {

View file

@ -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 {};

View file

@ -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 { .. } => {}

View file

@ -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(());

View file

@ -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);

View file

@ -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
}

View file

@ -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();

View file

@ -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
}

View file

@ -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);

View file

@ -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, > {}

View file

@ -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, >;

View file

@ -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, >();

View file

@ -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,

View file

@ -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::<()>;

View file

@ -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) {}

View file

@ -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 };

View file

@ -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 };

View file

@ -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());

View file

@ -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) {

View file

@ -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) {}