1
Fork 0

Revert suggestion verbosity change

This commit is contained in:
Esteban Küber 2024-07-22 22:51:53 +00:00
parent b30fdec5fb
commit 921de9d8ea
52 changed files with 402 additions and 811 deletions

View file

@ -954,7 +954,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
let msg_lifetimes = let msg_lifetimes =
format!("remove the lifetime argument{s}", s = pluralize!(num_redundant_lt_args)); format!("remove the lifetime argument{s}", s = pluralize!(num_redundant_lt_args));
err.span_suggestion_verbose( err.span_suggestion(
span_redundant_lt_args, span_redundant_lt_args,
msg_lifetimes, msg_lifetimes,
"", "",
@ -1000,7 +1000,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
s = pluralize!(num_redundant_gen_args), s = pluralize!(num_redundant_gen_args),
); );
err.span_suggestion_verbose( err.span_suggestion(
span_redundant_type_or_const_args, span_redundant_type_or_const_args,
msg_types_or_consts, msg_types_or_consts,
"", "",
@ -1050,7 +1050,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
}, },
); );
err.span_suggestion_verbose(span, msg, "", Applicability::MaybeIncorrect); err.span_suggestion(span, msg, "", Applicability::MaybeIncorrect);
} else if redundant_lifetime_args && redundant_type_or_const_args { } else if redundant_lifetime_args && redundant_type_or_const_args {
remove_lifetime_args(err); remove_lifetime_args(err);
remove_type_or_const_args(err); remove_type_or_const_args(err);

View file

@ -18,18 +18,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/invalid_const_in_lifetime_position.rs:4:26 --> $DIR/invalid_const_in_lifetime_position.rs:4:26
| |
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/invalid_const_in_lifetime_position.rs:2:10 --> $DIR/invalid_const_in_lifetime_position.rs:2:10
| |
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/invalid_const_in_lifetime_position.rs:4:26 --> $DIR/invalid_const_in_lifetime_position.rs:4:26
@ -52,7 +49,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/invalid_const_in_lifetime_position.rs:4:26 --> $DIR/invalid_const_in_lifetime_position.rs:4:26
| |
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/invalid_const_in_lifetime_position.rs:2:10 --> $DIR/invalid_const_in_lifetime_position.rs:2:10
@ -60,11 +59,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/invalid_const_in_lifetime_position.rs:4:26 --> $DIR/invalid_const_in_lifetime_position.rs:4:26
@ -87,7 +81,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/invalid_const_in_lifetime_position.rs:4:26 --> $DIR/invalid_const_in_lifetime_position.rs:4:26
| |
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/invalid_const_in_lifetime_position.rs:2:10 --> $DIR/invalid_const_in_lifetime_position.rs:2:10
@ -95,11 +91,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0038]: the trait `X` cannot be made into an object error[E0038]: the trait `X` cannot be made into an object
--> $DIR/invalid_const_in_lifetime_position.rs:4:20 --> $DIR/invalid_const_in_lifetime_position.rs:4:20

View file

@ -2,18 +2,15 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
--> $DIR/mismatched_arg_count.rs:7:29 --> $DIR/mismatched_arg_count.rs:7:29
| |
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
| ^^^^^ expected 1 lifetime argument | ^^^^^ ---- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: type alias defined here, with 1 lifetime parameter: `'a` note: type alias defined here, with 1 lifetime parameter: `'a`
--> $DIR/mismatched_arg_count.rs:5:6 --> $DIR/mismatched_arg_count.rs:5:6
| |
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc; LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
| ^^^^^ -- | ^^^^^ --
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>) {}
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,7 +2,9 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
--> $DIR/issue-100154.rs:4:5 --> $DIR/issue-100154.rs:4:5
| |
LL | foo::<()>(()); LL | foo::<()>(());
| ^^^ expected 0 generic arguments | ^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: function defined here, with 0 generic parameters note: function defined here, with 0 generic parameters
--> $DIR/issue-100154.rs:1:4 --> $DIR/issue-100154.rs:1:4
@ -10,11 +12,6 @@ note: function defined here, with 0 generic parameters
LL | fn foo(i: impl std::fmt::Display) {} LL | fn foo(i: impl std::fmt::Display) {}
| ^^^ | ^^^
= note: `impl Trait` cannot be explicitly specified as a generic argument = note: `impl Trait` cannot be explicitly specified as a generic argument
help: remove the unnecessary generics
|
LL - foo::<()>(());
LL + foo(());
|
error[E0277]: `()` doesn't implement `std::fmt::Display` error[E0277]: `()` doesn't implement `std::fmt::Display`
--> $DIR/issue-100154.rs:4:11 --> $DIR/issue-100154.rs:4:11

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
| |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> { LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
| ^^^^^^^^^^^^ expected 0 lifetime arguments | ^^^^^^^^^^^^---- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
| |
LL | struct LockedMarket<T>(T); LL | struct LockedMarket<T>(T);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
help: remove the unnecessary generics
|
LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket {
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
@ -35,7 +32,9 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
| |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> { LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
| ^^^^^^^^^^^^ expected 0 lifetime arguments | ^^^^^^^^^^^^---- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
@ -43,11 +42,6 @@ note: struct defined here, with 0 lifetime parameters
LL | struct LockedMarket<T>(T); LL | struct LockedMarket<T>(T);
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: remove the unnecessary generics
|
LL - async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
LL + async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket {
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59

View file

@ -2,13 +2,9 @@ error[E0107]: trait takes at most 2 generic arguments but 3 generic arguments we
--> $DIR/transmutable-ice-110969.rs:11:14 --> $DIR/transmutable-ice-110969.rs:11:14
| |
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>, LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments | ^^^^^^^^^^^^^^^^^^^^^ -------- help: remove the unnecessary generic argument
| | |
help: remove the unnecessary generic argument | expected at most 2 generic arguments
|
LL - Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
LL + Dst: BikeshedIntrinsicFrom<Src, Context>,
|
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/transmutable-ice-110969.rs:25:74 --> $DIR/transmutable-ice-110969.rs:25:74

View file

@ -23,18 +23,15 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
--> $DIR/infer-arg-test.rs:18:10 --> $DIR/infer-arg-test.rs:18:10
| |
LL | let a: All<_, _, _>; LL | let a: All<_, _, _>;
| ^^^ expected 2 generic arguments | ^^^ --- help: remove the unnecessary generic argument
| |
| expected 2 generic arguments
| |
note: struct defined here, with 2 generic parameters: `T`, `N` note: struct defined here, with 2 generic parameters: `T`, `N`
--> $DIR/infer-arg-test.rs:3:8 --> $DIR/infer-arg-test.rs:3:8
| |
LL | struct All<'a, T, const N: usize> { LL | struct All<'a, T, const N: usize> {
| ^^^ - -------------- | ^^^ - --------------
help: remove the unnecessary generic argument
|
LL - let a: All<_, _, _>;
LL + let a: All<_, _>;
|
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
--> $DIR/issue_114151.rs:17:5 --> $DIR/issue_114151.rs:17:5
| |
LL | foo::<_, L>([(); L + 1 + L]); LL | foo::<_, L>([(); L + 1 + L]);
| ^^^ expected 1 generic argument | ^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: function defined here, with 1 generic parameter: `N` note: function defined here, with 1 generic parameter: `N`
--> $DIR/issue_114151.rs:4:4 --> $DIR/issue_114151.rs:4:4
| |
LL | fn foo<const N: usize>( LL | fn foo<const N: usize>(
| ^^^ -------------- | ^^^ --------------
help: remove the unnecessary generic argument
|
LL - foo::<_, L>([(); L + 1 + L]);
LL + foo::<_>([(); L + 1 + L]);
|
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/issue_114151.rs:17:18 --> $DIR/issue_114151.rs:17:18

View file

@ -18,18 +18,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/issue-102768.rs:9:30 --> $DIR/issue-102768.rs:9:30
| |
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/issue-102768.rs:5:10 --> $DIR/issue-102768.rs:5:10
| |
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/issue-102768.rs:9:30 --> $DIR/issue-102768.rs:9:30
@ -52,7 +49,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/issue-102768.rs:9:30 --> $DIR/issue-102768.rs:9:30
| |
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/issue-102768.rs:5:10 --> $DIR/issue-102768.rs:5:10
@ -60,11 +59,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/issue-102768.rs:9:30 --> $DIR/issue-102768.rs:9:30
@ -87,7 +81,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/issue-102768.rs:9:30 --> $DIR/issue-102768.rs:9:30
| |
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/issue-102768.rs:5:10 --> $DIR/issue-102768.rs:5:10
@ -95,11 +91,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0038]: the trait `X` cannot be made into an object error[E0038]: the trait `X` cannot be made into an object
--> $DIR/issue-102768.rs:9:24 --> $DIR/issue-102768.rs:9:24

View file

@ -20,18 +20,15 @@ error[E0107]: function takes 2 generic arguments but 3 generic arguments were su
--> $DIR/incorrect-number-of-const-args.rs:9:5 --> $DIR/incorrect-number-of-const-args.rs:9:5
| |
LL | foo::<0, 0, 0>(); LL | foo::<0, 0, 0>();
| ^^^ expected 2 generic arguments | ^^^ --- help: remove the unnecessary generic argument
| |
| expected 2 generic arguments
| |
note: function defined here, with 2 generic parameters: `X`, `Y` note: function defined here, with 2 generic parameters: `X`, `Y`
--> $DIR/incorrect-number-of-const-args.rs:1:4 --> $DIR/incorrect-number-of-const-args.rs:1:4
| |
LL | fn foo<const X: usize, const Y: usize>() -> usize { LL | fn foo<const X: usize, const Y: usize>() -> usize {
| ^^^ -------------- -------------- | ^^^ -------------- --------------
help: remove the unnecessary generic argument
|
LL - foo::<0, 0, 0>();
LL + foo::<0, 0>();
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -27,18 +27,15 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/invalid-const-arg-for-type-param.rs:12:5 --> $DIR/invalid-const-arg-for-type-param.rs:12:5
| |
LL | S::<0>; LL | S::<0>;
| ^ expected 0 generic arguments | ^----- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/invalid-const-arg-for-type-param.rs:3:8 --> $DIR/invalid-const-arg-for-type-param.rs:3:8
| |
LL | struct S; LL | struct S;
| ^ | ^
help: remove the unnecessary generics
|
LL - S::<0>;
LL + S;
|
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View file

@ -2,13 +2,9 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
--> $DIR/invalid-constant-in-args.rs:4:12 --> $DIR/invalid-constant-in-args.rs:4:12
| |
LL | let _: Cell<&str, "a"> = Cell::new(""); LL | let _: Cell<&str, "a"> = Cell::new("");
| ^^^^ expected 1 generic argument | ^^^^ ----- help: remove the unnecessary generic argument
| | |
help: remove the unnecessary generic argument | expected 1 generic argument
|
LL - let _: Cell<&str, "a"> = Cell::new("");
LL + let _: Cell<&str> = Cell::new("");
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -20,18 +20,15 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
--> $DIR/constructor-lifetime-args.rs:19:5 --> $DIR/constructor-lifetime-args.rs:19:5
| |
LL | S::<'static, 'static, 'static>(&0, &0); LL | S::<'static, 'static, 'static>(&0, &0);
| ^ expected 2 lifetime arguments | ^ --------- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
| |
note: struct defined here, with 2 lifetime parameters: `'a`, `'b` note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/constructor-lifetime-args.rs:9:8 --> $DIR/constructor-lifetime-args.rs:9:8
| |
LL | struct S<'a, 'b>(&'a u8, &'b u8); LL | struct S<'a, 'b>(&'a u8, &'b u8);
| ^ -- -- | ^ -- --
help: remove the lifetime argument
|
LL - S::<'static, 'static, 'static>(&0, &0);
LL + S::<'static, 'static>(&0, &0);
|
error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/constructor-lifetime-args.rs:22:8 --> $DIR/constructor-lifetime-args.rs:22:8
@ -55,18 +52,15 @@ error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supp
--> $DIR/constructor-lifetime-args.rs:24:8 --> $DIR/constructor-lifetime-args.rs:24:8
| |
LL | E::V::<'static, 'static, 'static>(&0); LL | E::V::<'static, 'static, 'static>(&0);
| ^ expected 2 lifetime arguments | ^ --------- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
| |
note: enum defined here, with 2 lifetime parameters: `'a`, `'b` note: enum defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/constructor-lifetime-args.rs:10:6 --> $DIR/constructor-lifetime-args.rs:10:6
| |
LL | enum E<'a, 'b> { LL | enum E<'a, 'b> {
| ^ -- -- | ^ -- --
help: remove the lifetime argument
|
LL - E::V::<'static, 'static, 'static>(&0);
LL + E::V::<'static, 'static>(&0);
|
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -2,49 +2,33 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/effect_param.rs:11:9 --> $DIR/effect_param.rs:11:9
| |
LL | i8::checked_sub::<false>(42, 43); LL | i8::checked_sub::<false>(42, 43);
| ^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^--------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - i8::checked_sub::<false>(42, 43);
LL + i8::checked_sub(42, 43);
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:13:9 --> $DIR/effect_param.rs:13:9
| |
LL | i8::checked_sub::<true>(42, 43); LL | i8::checked_sub::<true>(42, 43);
| ^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^-------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - i8::checked_sub::<true>(42, 43);
LL + i8::checked_sub(42, 43);
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:4:9 --> $DIR/effect_param.rs:4:9
| |
LL | i8::checked_sub::<true>(42, 43); LL | i8::checked_sub::<true>(42, 43);
| ^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^-------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - i8::checked_sub::<true>(42, 43);
LL + i8::checked_sub(42, 43);
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/effect_param.rs:6:9 --> $DIR/effect_param.rs:6:9
| |
LL | i8::checked_sub::<false>(42, 43); LL | i8::checked_sub::<false>(42, 43);
| ^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^--------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - i8::checked_sub::<false>(42, 43);
LL + i8::checked_sub(42, 43);
|
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View file

@ -20,137 +20,113 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
--> $DIR/E0107.rs:17:10 --> $DIR/E0107.rs:17:10
| |
LL | bar: Bar<'a>, LL | bar: Bar<'a>,
| ^^^ expected 0 lifetime arguments | ^^^---- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
| |
note: enum defined here, with 0 lifetime parameters note: enum defined here, with 0 lifetime parameters
--> $DIR/E0107.rs:6:6 --> $DIR/E0107.rs:6:6
| |
LL | enum Bar { LL | enum Bar {
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - bar: Bar<'a>,
LL + bar: Bar,
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
--> $DIR/E0107.rs:21:11 --> $DIR/E0107.rs:21:11
| |
LL | foo2: Foo<'a, 'b, 'c>, LL | foo2: Foo<'a, 'b, 'c>,
| ^^^ expected 1 lifetime argument | ^^^ -------- help: remove the lifetime arguments
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:1:8 --> $DIR/E0107.rs:1:8
| |
LL | struct Foo<'a>(&'a str); LL | struct Foo<'a>(&'a str);
| ^^^ -- | ^^^ --
help: remove the lifetime arguments
|
LL - foo2: Foo<'a, 'b, 'c>,
LL + foo2: Foo<'a>,
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/E0107.rs:25:11 --> $DIR/E0107.rs:25:11
| |
LL | qux1: Qux<'a, 'b, i32>, LL | qux1: Qux<'a, 'b, i32>,
| ^^^ expected 1 lifetime argument | ^^^ ---- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:3:8 --> $DIR/E0107.rs:3:8
| |
LL | struct Qux<'a, T>(&'a T); LL | struct Qux<'a, T>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime argument
|
LL - qux1: Qux<'a, 'b, i32>,
LL + qux1: Qux<'a, i32>,
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/E0107.rs:29:11 --> $DIR/E0107.rs:29:11
| |
LL | qux2: Qux<'a, i32, 'b>, LL | qux2: Qux<'a, i32, 'b>,
| ^^^ expected 1 lifetime argument | ^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:3:8 --> $DIR/E0107.rs:3:8
| |
LL | struct Qux<'a, T>(&'a T); LL | struct Qux<'a, T>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime argument
|
LL - qux2: Qux<'a, i32, 'b>,
LL + qux2: Qux<'a>,
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
--> $DIR/E0107.rs:33:11 --> $DIR/E0107.rs:33:11
| |
LL | qux3: Qux<'a, 'b, 'c, i32>, LL | qux3: Qux<'a, 'b, 'c, i32>,
| ^^^ expected 1 lifetime argument | ^^^ -------- help: remove the lifetime arguments
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:3:8 --> $DIR/E0107.rs:3:8
| |
LL | struct Qux<'a, T>(&'a T); LL | struct Qux<'a, T>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime arguments
|
LL - qux3: Qux<'a, 'b, 'c, i32>,
LL + qux3: Qux<'a, i32>,
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
--> $DIR/E0107.rs:37:11 --> $DIR/E0107.rs:37:11
| |
LL | qux4: Qux<'a, i32, 'b, 'c>, LL | qux4: Qux<'a, i32, 'b, 'c>,
| ^^^ expected 1 lifetime argument | ^^^ ------------- help: remove the lifetime arguments
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:3:8 --> $DIR/E0107.rs:3:8
| |
LL | struct Qux<'a, T>(&'a T); LL | struct Qux<'a, T>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime arguments
|
LL - qux4: Qux<'a, i32, 'b, 'c>,
LL + qux4: Qux<'a>,
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
--> $DIR/E0107.rs:41:11 --> $DIR/E0107.rs:41:11
| |
LL | qux5: Qux<'a, 'b, i32, 'c>, LL | qux5: Qux<'a, 'b, i32, 'c>,
| ^^^ expected 1 lifetime argument | ^^^ ---- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/E0107.rs:3:8 --> $DIR/E0107.rs:3:8
| |
LL | struct Qux<'a, T>(&'a T); LL | struct Qux<'a, T>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime argument
|
LL - qux5: Qux<'a, 'b, i32, 'c>,
LL + qux5: Qux<'a, i32, 'c>,
|
error[E0107]: struct takes 0 lifetime arguments but 2 lifetime arguments were supplied error[E0107]: struct takes 0 lifetime arguments but 2 lifetime arguments were supplied
--> $DIR/E0107.rs:45:11 --> $DIR/E0107.rs:45:11
| |
LL | quux: Quux<'a, i32, 'b>, LL | quux: Quux<'a, i32, 'b>,
| ^^^^ expected 0 lifetime arguments | ^^^^ -- help: remove the lifetime argument
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/E0107.rs:4:8 --> $DIR/E0107.rs:4:8
| |
LL | struct Quux<T>(T); LL | struct Quux<T>(T);
| ^^^^ | ^^^^
help: remove the lifetime argument
|
LL - quux: Quux<'a, i32, 'b>,
LL + quux: Quux<, i32, 'b>,
|
error[E0107]: trait takes 0 generic arguments but 2 generic arguments were supplied error[E0107]: trait takes 0 generic arguments but 2 generic arguments were supplied
--> $DIR/E0107.rs:55:27 --> $DIR/E0107.rs:55:27

View file

@ -43,18 +43,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27 --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
| |
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
| ^ expected 0 generic arguments | ^---- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8 --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
| |
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27 --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
@ -77,7 +74,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27 --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
| |
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
| ^ expected 0 generic arguments | ^---- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8 --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
@ -85,11 +84,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27 --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
@ -112,7 +106,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27 --> $DIR/gat-trait-path-parenthesised-args.rs:5:27
| |
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
| ^ expected 0 generic arguments | ^---- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8 --> $DIR/gat-trait-path-parenthesised-args.rs:2:8
@ -120,11 +116,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0224]: at least one trait is required for an object type error[E0224]: at least one trait is required for an object type
--> $DIR/gat-trait-path-parenthesised-args.rs:5:29 --> $DIR/gat-trait-path-parenthesised-args.rs:5:29

View file

@ -2,18 +2,15 @@ error[E0107]: associated type takes 1 lifetime argument but 2 lifetime arguments
--> $DIR/parameter_number_and_kind.rs:11:24 --> $DIR/parameter_number_and_kind.rs:11:24
| |
LL | type FErr1 = Self::E<'static, 'static>; LL | type FErr1 = Self::E<'static, 'static>;
| ^ expected 1 lifetime argument | ^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: associated type defined here, with 1 lifetime parameter: `'a` note: associated type defined here, with 1 lifetime parameter: `'a`
--> $DIR/parameter_number_and_kind.rs:8:10 --> $DIR/parameter_number_and_kind.rs:8:10
| |
LL | type E<'a, T>; LL | type E<'a, T>;
| ^ -- | ^ --
help: remove the lifetime argument
|
LL - type FErr1 = Self::E<'static, 'static>;
LL + type FErr1 = Self::E<'static>;
|
error[E0107]: associated type takes 1 generic argument but 0 generic arguments were supplied error[E0107]: associated type takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/parameter_number_and_kind.rs:11:24 --> $DIR/parameter_number_and_kind.rs:11:24
@ -35,18 +32,15 @@ error[E0107]: associated type takes 1 generic argument but 2 generic arguments w
--> $DIR/parameter_number_and_kind.rs:14:27 --> $DIR/parameter_number_and_kind.rs:14:27
| |
LL | type FErr2<T> = Self::E<'static, T, u32>; LL | type FErr2<T> = Self::E<'static, T, u32>;
| ^ expected 1 generic argument | ^ ----- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: associated type defined here, with 1 generic parameter: `T` note: associated type defined here, with 1 generic parameter: `T`
--> $DIR/parameter_number_and_kind.rs:8:10 --> $DIR/parameter_number_and_kind.rs:8:10
| |
LL | type E<'a, T>; LL | type E<'a, T>;
| ^ - | ^ -
help: remove the unnecessary generic argument
|
LL - type FErr2<T> = Self::E<'static, T, u32>;
LL + type FErr2<T> = Self::E<'static, T>;
|
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View file

@ -18,18 +18,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/trait-path-type-error-once-implemented.rs:6:29 --> $DIR/trait-path-type-error-once-implemented.rs:6:29
| |
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/trait-path-type-error-once-implemented.rs:2:10 --> $DIR/trait-path-type-error-once-implemented.rs:2:10
| |
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/trait-path-type-error-once-implemented.rs:6:29 --> $DIR/trait-path-type-error-once-implemented.rs:6:29
@ -52,7 +49,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/trait-path-type-error-once-implemented.rs:6:29 --> $DIR/trait-path-type-error-once-implemented.rs:6:29
| |
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/trait-path-type-error-once-implemented.rs:2:10 --> $DIR/trait-path-type-error-once-implemented.rs:2:10
@ -60,11 +59,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
--> $DIR/trait-path-type-error-once-implemented.rs:6:29 --> $DIR/trait-path-type-error-once-implemented.rs:6:29
@ -87,7 +81,9 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/trait-path-type-error-once-implemented.rs:6:29 --> $DIR/trait-path-type-error-once-implemented.rs:6:29
| |
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {} LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
| ^ expected 0 generic arguments | ^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/trait-path-type-error-once-implemented.rs:2:10 --> $DIR/trait-path-type-error-once-implemented.rs:2:10
@ -95,11 +91,6 @@ note: associated type defined here, with 0 generic parameters
LL | type Y<'a>; LL | type Y<'a>;
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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 ()>>) {}
|
error[E0038]: the trait `X` cannot be made into an object error[E0038]: the trait `X` cannot be made into an object
--> $DIR/trait-path-type-error-once-implemented.rs:6:23 --> $DIR/trait-path-type-error-once-implemented.rs:6:23

View file

@ -2,86 +2,71 @@ error[E0107]: associated function takes 1 generic argument but 2 generic argumen
--> $DIR/bad-mid-path-type-params.rs:30:16 --> $DIR/bad-mid-path-type-params.rs:30:16
| |
LL | let _ = S::new::<isize,f64>(1, 1.0); LL | let _ = S::new::<isize,f64>(1, 1.0);
| ^^^ expected 1 generic argument | ^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: associated function defined here, with 1 generic parameter: `U` note: associated function defined here, with 1 generic parameter: `U`
--> $DIR/bad-mid-path-type-params.rs:6:8 --> $DIR/bad-mid-path-type-params.rs:6:8
| |
LL | fn new<U>(x: T, _: U) -> S<T> { LL | fn new<U>(x: T, _: U) -> S<T> {
| ^^^ - | ^^^ -
help: remove the unnecessary generic argument
|
LL - let _ = S::new::<isize,f64>(1, 1.0);
LL + let _ = S::new::<isize>(1, 1.0);
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/bad-mid-path-type-params.rs:33:13 --> $DIR/bad-mid-path-type-params.rs:33:13
| |
LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0); LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
| ^ expected 0 lifetime arguments | ^ -- help: remove the lifetime argument
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/bad-mid-path-type-params.rs:1:8 --> $DIR/bad-mid-path-type-params.rs:1:8
| |
LL | struct S<T> { LL | struct S<T> {
| ^ | ^
help: remove the lifetime argument
|
LL - let _ = S::<'a,isize>::new::<f64>(1, 1.0);
LL + let _ = S::<,isize>::new::<f64>(1, 1.0);
|
error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/bad-mid-path-type-params.rs:36:24 --> $DIR/bad-mid-path-type-params.rs:36:24
| |
LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0); LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
| ^^^ expected 1 generic argument | ^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: associated function defined here, with 1 generic parameter: `U` note: associated function defined here, with 1 generic parameter: `U`
--> $DIR/bad-mid-path-type-params.rs:14:8 --> $DIR/bad-mid-path-type-params.rs:14:8
| |
LL | fn new<U>(x: T, y: U) -> Self; LL | fn new<U>(x: T, y: U) -> Self;
| ^^^ - | ^^^ -
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);
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/bad-mid-path-type-params.rs:39:17 --> $DIR/bad-mid-path-type-params.rs:39:17
| |
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
| ^^^^^ expected 0 lifetime arguments | ^^^^^ -- help: remove the lifetime argument
| |
| expected 0 lifetime arguments
| |
note: trait defined here, with 0 lifetime parameters note: trait defined here, with 0 lifetime parameters
--> $DIR/bad-mid-path-type-params.rs:13:7 --> $DIR/bad-mid-path-type-params.rs:13:7
| |
LL | trait Trait<T> { LL | trait Trait<T> {
| ^^^^^ | ^^^^^
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);
|
error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/bad-mid-path-type-params.rs:39:36 --> $DIR/bad-mid-path-type-params.rs:39:36
| |
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0); LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
| ^^^ expected 1 generic argument | ^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: associated function defined here, with 1 generic parameter: `U` note: associated function defined here, with 1 generic parameter: `U`
--> $DIR/bad-mid-path-type-params.rs:14:8 --> $DIR/bad-mid-path-type-params.rs:14:8
| |
LL | fn new<U>(x: T, y: U) -> Self; LL | fn new<U>(x: T, y: U) -> Self;
| ^^^ - | ^^^ -
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);
|
error: aborting due to 5 previous errors error: aborting due to 5 previous errors

View file

@ -20,18 +20,15 @@ error[E0107]: function takes 1 lifetime argument but 2 lifetime arguments were s
--> $DIR/foreign-generic-mismatch.rs:8:31 --> $DIR/foreign-generic-mismatch.rs:8:31
| |
LL | foreign_generic_mismatch::lt_arg::<'static, 'static>(); LL | foreign_generic_mismatch::lt_arg::<'static, 'static>();
| ^^^^^^ expected 1 lifetime argument | ^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: function defined here, with 1 lifetime parameter: `'a` note: function defined here, with 1 lifetime parameter: `'a`
--> $DIR/auxiliary/foreign-generic-mismatch.rs:3:8 --> $DIR/auxiliary/foreign-generic-mismatch.rs:3:8
| |
LL | pub fn lt_arg<'a: 'a>() {} LL | pub fn lt_arg<'a: 'a>() {}
| ^^^^^^ -- | ^^^^^^ --
help: remove the lifetime argument
|
LL - foreign_generic_mismatch::lt_arg::<'static, 'static>();
LL + foreign_generic_mismatch::lt_arg::<'static>();
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -2,52 +2,43 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
--> $DIR/generic-arg-mismatch-recover.rs:6:5 --> $DIR/generic-arg-mismatch-recover.rs:6:5
| |
LL | Foo::<'static, 'static, ()>(&0); LL | Foo::<'static, 'static, ()>(&0);
| ^^^ expected 1 lifetime argument | ^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/generic-arg-mismatch-recover.rs:1:8 --> $DIR/generic-arg-mismatch-recover.rs:1:8
| |
LL | struct Foo<'a, T: 'a>(&'a T); LL | struct Foo<'a, T: 'a>(&'a T);
| ^^^ -- | ^^^ --
help: remove the lifetime argument
|
LL - Foo::<'static, 'static, ()>(&0);
LL + Foo::<'static, ()>(&0);
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/generic-arg-mismatch-recover.rs:9:5 --> $DIR/generic-arg-mismatch-recover.rs:9:5
| |
LL | Bar::<'static, 'static, ()>(&()); LL | Bar::<'static, 'static, ()>(&());
| ^^^ expected 1 lifetime argument | ^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/generic-arg-mismatch-recover.rs:3:8 --> $DIR/generic-arg-mismatch-recover.rs:3:8
| |
LL | struct Bar<'a>(&'a ()); LL | struct Bar<'a>(&'a ());
| ^^^ -- | ^^^ --
help: remove the lifetime argument
|
LL - Bar::<'static, 'static, ()>(&());
LL + Bar::<'static, ()>(&());
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/generic-arg-mismatch-recover.rs:9:5 --> $DIR/generic-arg-mismatch-recover.rs:9:5
| |
LL | Bar::<'static, 'static, ()>(&()); LL | Bar::<'static, 'static, ()>(&());
| ^^^ expected 0 generic arguments | ^^^ -- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/generic-arg-mismatch-recover.rs:3:8 --> $DIR/generic-arg-mismatch-recover.rs:3:8
| |
LL | struct Bar<'a>(&'a ()); LL | struct Bar<'a>(&'a ());
| ^^^ | ^^^
help: remove the unnecessary generic argument
|
LL - Bar::<'static, 'static, ()>(&());
LL + Bar::<'static, 'static, >(&());
|
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
--> $DIR/generic-impl-more-params-with-defaults.rs:13:5 --> $DIR/generic-impl-more-params-with-defaults.rs:13:5
| |
LL | Vec::<isize, Heap, bool>::new(); LL | Vec::<isize, Heap, bool>::new();
| ^^^ expected at most 2 generic arguments | ^^^ ------ help: remove the unnecessary generic argument
| |
| expected at most 2 generic arguments
| |
note: struct defined here, with at most 2 generic parameters: `T`, `A` note: struct defined here, with at most 2 generic parameters: `T`, `A`
--> $DIR/generic-impl-more-params-with-defaults.rs:5:8 --> $DIR/generic-impl-more-params-with-defaults.rs:5:8
| |
LL | struct Vec<T, A = Heap>( LL | struct Vec<T, A = Heap>(
| ^^^ - -------- | ^^^ - --------
help: remove the unnecessary generic argument
|
LL - Vec::<isize, Heap, bool>::new();
LL + Vec::<isize, Heap>::new();
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
--> $DIR/generic-type-more-params-with-defaults.rs:9:12 --> $DIR/generic-type-more-params-with-defaults.rs:9:12
| |
LL | let _: Vec<isize, Heap, bool>; LL | let _: Vec<isize, Heap, bool>;
| ^^^ expected at most 2 generic arguments | ^^^ ------ help: remove the unnecessary generic argument
| |
| expected at most 2 generic arguments
| |
note: struct defined here, with at most 2 generic parameters: `T`, `A` note: struct defined here, with at most 2 generic parameters: `T`, `A`
--> $DIR/generic-type-more-params-with-defaults.rs:5:8 --> $DIR/generic-type-more-params-with-defaults.rs:5:8
| |
LL | struct Vec<T, A = Heap>( LL | struct Vec<T, A = Heap>(
| ^^^ - -------- | ^^^ - --------
help: remove the unnecessary generic argument
|
LL - let _: Vec<isize, Heap, bool>;
LL + let _: Vec<isize, Heap>;
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -171,86 +171,71 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
--> $DIR/wrong-number-of-args.rs:6:14 --> $DIR/wrong-number-of-args.rs:6:14
| |
LL | type B = Ty<'static>; LL | type B = Ty<'static>;
| ^^ expected 0 lifetime arguments | ^^--------- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/wrong-number-of-args.rs:2:12 --> $DIR/wrong-number-of-args.rs:2:12
| |
LL | struct Ty; LL | struct Ty;
| ^^ | ^^
help: remove the unnecessary generics
|
LL - type B = Ty<'static>;
LL + type B = Ty;
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/wrong-number-of-args.rs:10:14 --> $DIR/wrong-number-of-args.rs:10:14
| |
LL | type C = Ty<'static, usize>; LL | type C = Ty<'static, usize>;
| ^^ expected 0 lifetime arguments | ^^ ------- help: remove the lifetime argument
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/wrong-number-of-args.rs:2:12 --> $DIR/wrong-number-of-args.rs:2:12
| |
LL | struct Ty; LL | struct Ty;
| ^^ | ^^
help: remove the lifetime argument
|
LL - type C = Ty<'static, usize>;
LL + type C = Ty<, usize>;
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/wrong-number-of-args.rs:10:14 --> $DIR/wrong-number-of-args.rs:10:14
| |
LL | type C = Ty<'static, usize>; LL | type C = Ty<'static, usize>;
| ^^ expected 0 generic arguments | ^^ ----- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/wrong-number-of-args.rs:2:12 --> $DIR/wrong-number-of-args.rs:2:12
| |
LL | struct Ty; LL | struct Ty;
| ^^ | ^^
help: remove the unnecessary generic argument
|
LL - type C = Ty<'static, usize>;
LL + type C = Ty<'static, >;
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/wrong-number-of-args.rs:16:14 --> $DIR/wrong-number-of-args.rs:16:14
| |
LL | type D = Ty<'static, usize, { 0 }>; LL | type D = Ty<'static, usize, { 0 }>;
| ^^ expected 0 lifetime arguments | ^^ ------- help: remove the lifetime argument
| |
| expected 0 lifetime arguments
| |
note: struct defined here, with 0 lifetime parameters note: struct defined here, with 0 lifetime parameters
--> $DIR/wrong-number-of-args.rs:2:12 --> $DIR/wrong-number-of-args.rs:2:12
| |
LL | struct Ty; LL | struct Ty;
| ^^ | ^^
help: remove the lifetime argument
|
LL - type D = Ty<'static, usize, { 0 }>;
LL + type D = Ty<, usize, { 0 }>;
|
error[E0107]: struct takes 0 generic arguments but 2 generic arguments were supplied error[E0107]: struct takes 0 generic arguments but 2 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:16:14 --> $DIR/wrong-number-of-args.rs:16:14
| |
LL | type D = Ty<'static, usize, { 0 }>; LL | type D = Ty<'static, usize, { 0 }>;
| ^^ expected 0 generic arguments | ^^ ------- help: remove the unnecessary generic arguments
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/wrong-number-of-args.rs:2:12 --> $DIR/wrong-number-of-args.rs:2:12
| |
LL | struct Ty; LL | struct Ty;
| ^^ | ^^
help: remove the unnecessary generic arguments
|
LL - type D = Ty<'static, usize, { 0 }>;
LL + type D = Ty<'static, usize>;
|
error[E0107]: missing generics for struct `type_and_type::Ty` error[E0107]: missing generics for struct `type_and_type::Ty`
--> $DIR/wrong-number-of-args.rs:26:14 --> $DIR/wrong-number-of-args.rs:26:14
@ -290,18 +275,15 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
--> $DIR/wrong-number-of-args.rs:36:14 --> $DIR/wrong-number-of-args.rs:36:14
| |
LL | type D = Ty<usize, String, char>; LL | type D = Ty<usize, String, char>;
| ^^ expected 2 generic arguments | ^^ ------ help: remove the unnecessary generic argument
| |
| expected 2 generic arguments
| |
note: struct defined here, with 2 generic parameters: `A`, `B` note: struct defined here, with 2 generic parameters: `A`, `B`
--> $DIR/wrong-number-of-args.rs:24:12 --> $DIR/wrong-number-of-args.rs:24:12
| |
LL | struct Ty<A, B>(A, B); LL | struct Ty<A, B>(A, B);
| ^^ - - | ^^ - -
help: remove the unnecessary generic argument
|
LL - type D = Ty<usize, String, char>;
LL + type D = Ty<usize, String>;
|
error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:40:14 --> $DIR/wrong-number-of-args.rs:40:14
@ -371,35 +353,29 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
--> $DIR/wrong-number-of-args.rs:70:14 --> $DIR/wrong-number-of-args.rs:70:14
| |
LL | type F = Ty<'static, usize, 'static, usize>; LL | type F = Ty<'static, usize, 'static, usize>;
| ^^ expected 1 lifetime argument | ^^ ---------------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:46:12 --> $DIR/wrong-number-of-args.rs:46:12
| |
LL | struct Ty<'a, T>(&'a T); LL | struct Ty<'a, T>(&'a T);
| ^^ -- | ^^ --
help: remove the lifetime argument
|
LL - type F = Ty<'static, usize, 'static, usize>;
LL + type F = Ty<'static, usize>;
|
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:70:14 --> $DIR/wrong-number-of-args.rs:70:14
| |
LL | type F = Ty<'static, usize, 'static, usize>; LL | type F = Ty<'static, usize, 'static, usize>;
| ^^ expected 1 generic argument | ^^ ---------------- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: struct defined here, with 1 generic parameter: `T` note: struct defined here, with 1 generic parameter: `T`
--> $DIR/wrong-number-of-args.rs:46:12 --> $DIR/wrong-number-of-args.rs:46:12
| |
LL | struct Ty<'a, T>(&'a T); LL | struct Ty<'a, T>(&'a T);
| ^^ - | ^^ -
help: remove the unnecessary generic argument
|
LL - type F = Ty<'static, usize, 'static, usize>;
LL + type F = Ty<'static, usize>;
|
error[E0107]: missing generics for struct `type_and_type_and_type::Ty` error[E0107]: missing generics for struct `type_and_type_and_type::Ty`
--> $DIR/wrong-number-of-args.rs:80:14 --> $DIR/wrong-number-of-args.rs:80:14
@ -439,18 +415,15 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
--> $DIR/wrong-number-of-args.rs:92:14 --> $DIR/wrong-number-of-args.rs:92:14
| |
LL | type E = Ty<usize, String, char, f64>; LL | type E = Ty<usize, String, char, f64>;
| ^^ expected at most 3 generic arguments | ^^ ----- help: remove the unnecessary generic argument
| |
| expected at most 3 generic arguments
| |
note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C` note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C`
--> $DIR/wrong-number-of-args.rs:78:12 --> $DIR/wrong-number-of-args.rs:78:12
| |
LL | struct Ty<A, B, C = &'static str>(A, B, C); LL | struct Ty<A, B, C = &'static str>(A, B, C);
| ^^ - - ---------------- | ^^ - - ----------------
help: remove the unnecessary generic argument
|
LL - type E = Ty<usize, String, char, f64>;
LL + type E = Ty<usize, String, char>;
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:96:14 --> $DIR/wrong-number-of-args.rs:96:14
@ -472,35 +445,29 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/wrong-number-of-args.rs:116:22 --> $DIR/wrong-number-of-args.rs:116:22
| |
LL | type A = Box<dyn NonGeneric<usize>>; LL | type A = Box<dyn NonGeneric<usize>>;
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/wrong-number-of-args.rs:104:11 --> $DIR/wrong-number-of-args.rs:104:11
| |
LL | trait NonGeneric { LL | trait NonGeneric {
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - type A = Box<dyn NonGeneric<usize>>;
LL + type A = Box<dyn NonGeneric>;
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/wrong-number-of-args.rs:125:22 --> $DIR/wrong-number-of-args.rs:125:22
| |
LL | type C = Box<dyn GenericLifetime<'static, 'static>>; LL | type C = Box<dyn GenericLifetime<'static, 'static>>;
| ^^^^^^^^^^^^^^^ expected 1 lifetime argument | ^^^^^^^^^^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: trait defined here, with 1 lifetime parameter: `'a` note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:108:11 --> $DIR/wrong-number-of-args.rs:108:11
| |
LL | trait GenericLifetime<'a> { LL | trait GenericLifetime<'a> {
| ^^^^^^^^^^^^^^^ -- | ^^^^^^^^^^^^^^^ --
help: remove the lifetime argument
|
LL - type C = Box<dyn GenericLifetime<'static, 'static>>;
LL + type C = Box<dyn GenericLifetime<'static>>;
|
error[E0107]: missing generics for trait `GenericType` error[E0107]: missing generics for trait `GenericType`
--> $DIR/wrong-number-of-args.rs:129:22 --> $DIR/wrong-number-of-args.rs:129:22
@ -522,18 +489,15 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
--> $DIR/wrong-number-of-args.rs:133:22 --> $DIR/wrong-number-of-args.rs:133:22
| |
LL | type E = Box<dyn GenericType<String, usize>>; LL | type E = Box<dyn GenericType<String, usize>>;
| ^^^^^^^^^^^ expected 1 generic argument | ^^^^^^^^^^^ ------- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: trait defined here, with 1 generic parameter: `A` note: trait defined here, with 1 generic parameter: `A`
--> $DIR/wrong-number-of-args.rs:112:11 --> $DIR/wrong-number-of-args.rs:112:11
| |
LL | trait GenericType<A> { LL | trait GenericType<A> {
| ^^^^^^^^^^^ - | ^^^^^^^^^^^ -
help: remove the unnecessary generic argument
|
LL - type E = Box<dyn GenericType<String, usize>>;
LL + type E = Box<dyn GenericType<String>>;
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:142:22 --> $DIR/wrong-number-of-args.rs:142:22
@ -555,52 +519,43 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/wrong-number-of-args.rs:153:26 --> $DIR/wrong-number-of-args.rs:153:26
| |
LL | type A = Box<dyn NonGenericAT<usize, AssocTy=()>>; LL | type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
| ^^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^^------------------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/wrong-number-of-args.rs:149:15 --> $DIR/wrong-number-of-args.rs:149:15
| |
LL | trait NonGenericAT { LL | trait NonGenericAT {
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
help: remove the unnecessary generics
|
LL - type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
LL + type A = Box<dyn NonGenericAT>;
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/wrong-number-of-args.rs:168:26 --> $DIR/wrong-number-of-args.rs:168:26
| |
LL | type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>; LL | type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^ expected 1 lifetime argument | ^^^^^^^^^^^^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: trait defined here, with 1 lifetime parameter: `'a` note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:159:15 --> $DIR/wrong-number-of-args.rs:159:15
| |
LL | trait GenericLifetimeAT<'a> { LL | trait GenericLifetimeAT<'a> {
| ^^^^^^^^^^^^^^^^^ -- | ^^^^^^^^^^^^^^^^^ --
help: remove the lifetime argument
|
LL - type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
LL + type B = Box<dyn GenericLifetimeAT<'static, AssocTy=()>>;
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/wrong-number-of-args.rs:172:26 --> $DIR/wrong-number-of-args.rs:172:26
| |
LL | type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>; LL | type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^^^^^^^^ -- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/wrong-number-of-args.rs:159:15 --> $DIR/wrong-number-of-args.rs:159:15
| |
LL | trait GenericLifetimeAT<'a> { LL | trait GenericLifetimeAT<'a> {
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
help: remove the unnecessary generic argument
|
LL - type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
LL + type C = Box<dyn GenericLifetimeAT<, AssocTy=()>>;
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:185:26 --> $DIR/wrong-number-of-args.rs:185:26
@ -622,35 +577,29 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
--> $DIR/wrong-number-of-args.rs:189:26 --> $DIR/wrong-number-of-args.rs:189:26
| |
LL | type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>; LL | type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
| ^^^^^^^^^^^^^ expected 1 generic argument | ^^^^^^^^^^^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: trait defined here, with 1 generic parameter: `A` note: trait defined here, with 1 generic parameter: `A`
--> $DIR/wrong-number-of-args.rs:181:15 --> $DIR/wrong-number-of-args.rs:181:15
| |
LL | trait GenericTypeAT<A> { LL | trait GenericTypeAT<A> {
| ^^^^^^^^^^^^^ - | ^^^^^^^^^^^^^ -
help: remove the unnecessary generic argument
|
LL - type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
LL + type B = Box<dyn GenericTypeAT<(), AssocTy=()>>;
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/wrong-number-of-args.rs:193:26 --> $DIR/wrong-number-of-args.rs:193:26
| |
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>; LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
| ^^^^^^^^^^^^^ expected 0 lifetime arguments | ^^^^^^^^^^^^^--------------------- help: remove the unnecessary generics
| |
| expected 0 lifetime arguments
| |
note: trait defined here, with 0 lifetime parameters note: trait defined here, with 0 lifetime parameters
--> $DIR/wrong-number-of-args.rs:181:15 --> $DIR/wrong-number-of-args.rs:181:15
| |
LL | trait GenericTypeAT<A> { LL | trait GenericTypeAT<A> {
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
help: remove the unnecessary generics
|
LL - type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
LL + type C = Box<dyn GenericTypeAT>;
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:193:26 --> $DIR/wrong-number-of-args.rs:193:26
@ -704,18 +653,15 @@ error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supp
--> $DIR/wrong-number-of-args.rs:216:26 --> $DIR/wrong-number-of-args.rs:216:26
| |
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>; LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument | ^^^^^^^^^^^^^^^^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: trait defined here, with 1 lifetime parameter: `'a` note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ -- | ^^^^^^^^^^^^^^^^^^^^^ --
help: remove the lifetime argument
|
LL - type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
LL + type C = Box<dyn GenericLifetimeTypeAT<'static, AssocTy=()>>;
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:216:26 --> $DIR/wrong-number-of-args.rs:216:26
@ -737,86 +683,71 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
--> $DIR/wrong-number-of-args.rs:227:26 --> $DIR/wrong-number-of-args.rs:227:26
| |
LL | type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>; LL | type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument | ^^^^^^^^^^^^^^^^^^^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: trait defined here, with 1 generic parameter: `A` note: trait defined here, with 1 generic parameter: `A`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ - | ^^^^^^^^^^^^^^^^^^^^^ -
help: remove the unnecessary generic argument
|
LL - type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
LL + type E = Box<dyn GenericLifetimeTypeAT<(), AssocTy=()>>;
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/wrong-number-of-args.rs:234:26 --> $DIR/wrong-number-of-args.rs:234:26
| |
LL | type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>; LL | type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument | ^^^^^^^^^^^^^^^^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: trait defined here, with 1 lifetime parameter: `'a` note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ -- | ^^^^^^^^^^^^^^^^^^^^^ --
help: remove the lifetime argument
|
LL - type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
LL + type F = Box<dyn GenericLifetimeTypeAT<'static, (), AssocTy=()>>;
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:238:26 --> $DIR/wrong-number-of-args.rs:238:26
| |
LL | type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>; LL | type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument | ^^^^^^^^^^^^^^^^^^^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: trait defined here, with 1 generic parameter: `A` note: trait defined here, with 1 generic parameter: `A`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ - | ^^^^^^^^^^^^^^^^^^^^^ -
help: remove the unnecessary generic argument
|
LL - type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
LL + type G = Box<dyn GenericLifetimeTypeAT<'static, (), AssocTy=()>>;
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
--> $DIR/wrong-number-of-args.rs:242:26 --> $DIR/wrong-number-of-args.rs:242:26
| |
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>; LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument | ^^^^^^^^^^^^^^^^^^^^^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: trait defined here, with 1 lifetime parameter: `'a` note: trait defined here, with 1 lifetime parameter: `'a`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ -- | ^^^^^^^^^^^^^^^^^^^^^ --
help: remove the lifetime argument
|
LL - type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
LL + type H = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:242:26 --> $DIR/wrong-number-of-args.rs:242:26
| |
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>; LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument | ^^^^^^^^^^^^^^^^^^^^^ ---- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: trait defined here, with 1 generic parameter: `A` note: trait defined here, with 1 generic parameter: `A`
--> $DIR/wrong-number-of-args.rs:201:15 --> $DIR/wrong-number-of-args.rs:201:15
| |
LL | trait GenericLifetimeTypeAT<'a, A> { LL | trait GenericLifetimeTypeAT<'a, A> {
| ^^^^^^^^^^^^^^^^^^^^^ - | ^^^^^^^^^^^^^^^^^^^^^ -
help: remove the unnecessary generic argument
|
LL - type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
LL + type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
error[E0107]: trait takes 2 generic arguments but 0 generic arguments were supplied error[E0107]: trait takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:254:26 --> $DIR/wrong-number-of-args.rs:254:26
@ -856,18 +787,15 @@ error[E0107]: trait takes 2 generic arguments but 3 generic arguments were suppl
--> $DIR/wrong-number-of-args.rs:262:26 --> $DIR/wrong-number-of-args.rs:262:26
| |
LL | type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>; LL | type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
| ^^^^^^^^^^^^^^^^^ expected 2 generic arguments | ^^^^^^^^^^^^^^^^^ ---- help: remove the unnecessary generic argument
| |
| expected 2 generic arguments
| |
note: trait defined here, with 2 generic parameters: `A`, `B` note: trait defined here, with 2 generic parameters: `A`, `B`
--> $DIR/wrong-number-of-args.rs:250:15 --> $DIR/wrong-number-of-args.rs:250:15
| |
LL | trait GenericTypeTypeAT<A, B> { LL | trait GenericTypeTypeAT<A, B> {
| ^^^^^^^^^^^^^^^^^ - - | ^^^^^^^^^^^^^^^^^ - -
help: remove the unnecessary generic argument
|
LL - type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
LL + type C = Box<dyn GenericTypeTypeAT<(), (), AssocTy=()>>;
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/wrong-number-of-args.rs:277:26 --> $DIR/wrong-number-of-args.rs:277:26
@ -983,13 +911,9 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
--> $DIR/wrong-number-of-args.rs:318:18 --> $DIR/wrong-number-of-args.rs:318:18
| |
LL | type C = HashMap<'static>; LL | type C = HashMap<'static>;
| ^^^^^^^ expected 0 lifetime arguments | ^^^^^^^--------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 lifetime arguments
|
LL - type C = HashMap<'static>;
LL + type C = HashMap;
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:318:18 --> $DIR/wrong-number-of-args.rs:318:18
@ -1006,13 +930,9 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
--> $DIR/wrong-number-of-args.rs:324:18 --> $DIR/wrong-number-of-args.rs:324:18
| |
LL | type D = HashMap<usize, String, char, f64>; LL | type D = HashMap<usize, String, char, f64>;
| ^^^^^^^ expected at most 3 generic arguments | ^^^^^^^ ----- help: remove the unnecessary generic argument
| | |
help: remove the unnecessary generic argument | expected at most 3 generic arguments
|
LL - type D = HashMap<usize, String, char, f64>;
LL + type D = HashMap<usize, String, char>;
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:328:18 --> $DIR/wrong-number-of-args.rs:328:18
@ -1053,13 +973,9 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
--> $DIR/wrong-number-of-args.rs:342:18 --> $DIR/wrong-number-of-args.rs:342:18
| |
LL | type C = Result<'static>; LL | type C = Result<'static>;
| ^^^^^^ expected 0 lifetime arguments | ^^^^^^--------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 lifetime arguments
|
LL - type C = Result<'static>;
LL + type C = Result;
|
error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:342:18 --> $DIR/wrong-number-of-args.rs:342:18
@ -1076,13 +992,9 @@ error[E0107]: enum takes 2 generic arguments but 3 generic arguments were suppli
--> $DIR/wrong-number-of-args.rs:348:18 --> $DIR/wrong-number-of-args.rs:348:18
| |
LL | type D = Result<usize, String, char>; LL | type D = Result<usize, String, char>;
| ^^^^^^ expected 2 generic arguments | ^^^^^^ ------ help: remove the unnecessary generic argument
| | |
help: remove the unnecessary generic argument | expected 2 generic arguments
|
LL - type D = Result<usize, String, char>;
LL + type D = Result<usize, String>;
|
error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
--> $DIR/wrong-number-of-args.rs:352:18 --> $DIR/wrong-number-of-args.rs:352:18

View file

@ -2,7 +2,9 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
--> $DIR/explicit-generic-args-for-impl.rs:4:5 --> $DIR/explicit-generic-args-for-impl.rs:4:5
| |
LL | foo::<str, String>("".to_string()); LL | foo::<str, String>("".to_string());
| ^^^ expected 1 generic argument | ^^^ -------- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: function defined here, with 1 generic parameter: `T` note: function defined here, with 1 generic parameter: `T`
--> $DIR/explicit-generic-args-for-impl.rs:1:4 --> $DIR/explicit-generic-args-for-impl.rs:1:4
@ -10,11 +12,6 @@ note: function defined here, with 1 generic parameter: `T`
LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {} LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
| ^^^ - | ^^^ -
= note: `impl Trait` cannot be explicitly specified as a generic argument = note: `impl Trait` cannot be explicitly specified as a generic argument
help: remove the unnecessary generic argument
|
LL - foo::<str, String>("".to_string());
LL + foo::<str>("".to_string());
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -38,35 +38,29 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/opaque-and-lifetime-mismatch.rs:4:17 --> $DIR/opaque-and-lifetime-mismatch.rs:4:17
| |
LL | fn bar() -> Wrapper<impl Sized>; LL | fn bar() -> Wrapper<impl Sized>;
| ^^^^^^^ expected 0 generic arguments | ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8 --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
| |
LL | struct Wrapper<'rom>(&'rom ()); LL | struct Wrapper<'rom>(&'rom ());
| ^^^^^^^ | ^^^^^^^
help: remove the unnecessary generic argument
|
LL - fn bar() -> Wrapper<impl Sized>;
LL + fn bar() -> Wrapper<>;
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/opaque-and-lifetime-mismatch.rs:18:17 --> $DIR/opaque-and-lifetime-mismatch.rs:18:17
| |
LL | fn foo() -> Wrapper<impl Sized>; LL | fn foo() -> Wrapper<impl Sized>;
| ^^^^^^^ expected 0 generic arguments | ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8 --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
| |
LL | struct Wrapper<'rom>(&'rom ()); LL | struct Wrapper<'rom>(&'rom ());
| ^^^^^^^ | ^^^^^^^
help: remove the unnecessary generic argument
|
LL - fn foo() -> Wrapper<impl Sized>;
LL + fn foo() -> Wrapper<>;
|
error[E0053]: method `bar` has an incompatible return type for trait error[E0053]: method `bar` has an incompatible return type for trait
--> $DIR/opaque-and-lifetime-mismatch.rs:10:17 --> $DIR/opaque-and-lifetime-mismatch.rs:10:17
@ -99,18 +93,15 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/opaque-and-lifetime-mismatch.rs:24:17 --> $DIR/opaque-and-lifetime-mismatch.rs:24:17
| |
LL | fn foo() -> Wrapper<impl Sized> { LL | fn foo() -> Wrapper<impl Sized> {
| ^^^^^^^ expected 0 generic arguments | ^^^^^^^ ---------- help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8 --> $DIR/opaque-and-lifetime-mismatch.rs:1:8
| |
LL | struct Wrapper<'rom>(&'rom ()); LL | struct Wrapper<'rom>(&'rom ());
| ^^^^^^^ | ^^^^^^^
help: remove the unnecessary generic argument
|
LL - fn foo() -> Wrapper<impl Sized> {
LL + fn foo() -> Wrapper<> {
|
error: aborting due to 8 previous errors error: aborting due to 8 previous errors

View file

@ -2,13 +2,9 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
--> $DIR/issue-18423.rs:4:8 --> $DIR/issue-18423.rs:4:8
| |
LL | x: Box<'a, isize> LL | x: Box<'a, isize>
| ^^^ expected 0 lifetime arguments | ^^^ -- help: remove the lifetime argument
| | |
help: remove the lifetime argument | expected 0 lifetime arguments
|
LL - x: Box<'a, isize>
LL + x: Box<, isize>
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,7 +2,9 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
--> $DIR/issue-53251.rs:11:20 --> $DIR/issue-53251.rs:11:20
| |
LL | S::f::<i64>(); LL | S::f::<i64>();
| ^ expected 0 generic arguments | ^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
... ...
LL | impl_add!(a b); LL | impl_add!(a b);
| -------------- in this macro invocation | -------------- in this macro invocation
@ -13,17 +15,14 @@ note: associated function defined here, with 0 generic parameters
LL | fn f() {} LL | fn f() {}
| ^ | ^
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the unnecessary generics
|
LL - S::f::<i64>();
LL + S::f();
|
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-53251.rs:11:20 --> $DIR/issue-53251.rs:11:20
| |
LL | S::f::<i64>(); LL | S::f::<i64>();
| ^ expected 0 generic arguments | ^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
... ...
LL | impl_add!(a b); LL | impl_add!(a b);
| -------------- in this macro invocation | -------------- in this macro invocation
@ -35,11 +34,6 @@ LL | fn f() {}
| ^ | ^
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = 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) = note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the unnecessary generics
|
LL - S::f::<i64>();
LL + S::f();
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -20,18 +20,15 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/issue-60622.rs:10:7 --> $DIR/issue-60622.rs:10:7
| |
LL | b.a::<'_, T>(); LL | b.a::<'_, T>();
| ^ expected 0 generic arguments | ^ - help: remove the unnecessary generic argument
| |
| expected 0 generic arguments
| |
note: method defined here, with 0 generic parameters note: method defined here, with 0 generic parameters
--> $DIR/issue-60622.rs:6:8 --> $DIR/issue-60622.rs:6:8
| |
LL | fn a(&self) {} LL | fn a(&self) {}
| ^ | ^
help: remove the unnecessary generic argument
|
LL - b.a::<'_, T>();
LL + b.a::<'_, >();
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
--> $DIR/mismatched_arg_count.rs:9:29 --> $DIR/mismatched_arg_count.rs:9:29
| |
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {} LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
| ^^^^^ expected 1 lifetime argument | ^^^^^ ---- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: type alias defined here, with 1 lifetime parameter: `'a` note: type alias defined here, with 1 lifetime parameter: `'a`
--> $DIR/mismatched_arg_count.rs:7:6 --> $DIR/mismatched_arg_count.rs:7:6
| |
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc; LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
| ^^^^^ -- | ^^^^^ --
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>) {}
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
--> $DIR/noisy-follow-up-erro.rs:12:30 --> $DIR/noisy-follow-up-erro.rs:12:30
| |
LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> { LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
| ^^^ expected 2 lifetime arguments | ^^^ ---- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
| |
note: struct defined here, with 2 lifetime parameters: `'c`, `'d` note: struct defined here, with 2 lifetime parameters: `'c`, `'d`
--> $DIR/noisy-follow-up-erro.rs:1:8 --> $DIR/noisy-follow-up-erro.rs:1:8
| |
LL | struct Foo<'c, 'd>(&'c (), &'d ()); LL | struct Foo<'c, 'd>(&'c (), &'d ());
| ^^^ -- -- | ^^^ -- --
help: remove the lifetime argument
|
LL - fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
LL + fn boom(&self, foo: &mut Foo<'_, '_>) -> Result<(), &'a ()> {
|
error[E0621]: explicit lifetime required in the type of `foo` error[E0621]: explicit lifetime required in the type of `foo`
--> $DIR/noisy-follow-up-erro.rs:14:9 --> $DIR/noisy-follow-up-erro.rs:14:9

View file

@ -20,18 +20,15 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
--> $DIR/method-call-lifetime-args-fail.rs:18:7 --> $DIR/method-call-lifetime-args-fail.rs:18:7
| |
LL | S.early::<'static, 'static, 'static>(); LL | S.early::<'static, 'static, 'static>();
| ^^^^^ expected 2 lifetime arguments | ^^^^^ --------- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
| |
note: method defined here, with 2 lifetime parameters: `'a`, `'b` note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8 --> $DIR/method-call-lifetime-args-fail.rs:6:8
| |
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
| ^^^^^ -- -- | ^^^^^ -- --
help: remove the lifetime argument
|
LL - S.early::<'static, 'static, 'static>();
LL + S.early::<'static, 'static>();
|
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
--> $DIR/method-call-lifetime-args-fail.rs:27:15 --> $DIR/method-call-lifetime-args-fail.rs:27:15
@ -223,18 +220,15 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
--> $DIR/method-call-lifetime-args-fail.rs:65:8 --> $DIR/method-call-lifetime-args-fail.rs:65:8
| |
LL | S::early::<'static, 'static, 'static>(S); LL | S::early::<'static, 'static, 'static>(S);
| ^^^^^ expected 2 lifetime arguments | ^^^^^ --------- help: remove the lifetime argument
| |
| expected 2 lifetime arguments
| |
note: method defined here, with 2 lifetime parameters: `'a`, `'b` note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8 --> $DIR/method-call-lifetime-args-fail.rs:6:8
| |
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} } LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
| ^^^^^ -- -- | ^^^^^ -- --
help: remove the lifetime argument
|
LL - S::early::<'static, 'static, 'static>(S);
LL + S::early::<'static, 'static>(S);
|
error: aborting due to 18 previous errors error: aborting due to 18 previous errors

View file

@ -12,18 +12,15 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/issue-3214.rs:6:22 --> $DIR/issue-3214.rs:6:22
| |
LL | impl<T> Drop for Foo<T> { LL | impl<T> Drop for Foo<T> {
| ^^^ expected 0 generic arguments | ^^^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: struct defined here, with 0 generic parameters note: struct defined here, with 0 generic parameters
--> $DIR/issue-3214.rs:2:12 --> $DIR/issue-3214.rs:2:12
| |
LL | struct Foo { LL | struct Foo {
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - impl<T> Drop for Foo<T> {
LL + impl<T> Drop for Foo {
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
--> $DIR/no-explicit-const-params-cross-crate.rs:14:5 --> $DIR/no-explicit-const-params-cross-crate.rs:14:5
| |
LL | foo::<false>(); LL | foo::<false>();
| ^^^ expected 0 generic arguments | ^^^--------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: function defined here, with 0 generic parameters note: function defined here, with 0 generic parameters
--> $DIR/auxiliary/cross-crate.rs:5:14 --> $DIR/auxiliary/cross-crate.rs:5:14
| |
LL | pub const fn foo() {} LL | pub const fn foo() {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - foo::<false>();
LL + foo();
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params-cross-crate.rs:16:12 --> $DIR/no-explicit-const-params-cross-crate.rs:16:12
@ -35,18 +32,15 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
--> $DIR/no-explicit-const-params-cross-crate.rs:7:5 --> $DIR/no-explicit-const-params-cross-crate.rs:7:5
| |
LL | foo::<true>(); LL | foo::<true>();
| ^^^ expected 0 generic arguments | ^^^-------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: function defined here, with 0 generic parameters note: function defined here, with 0 generic parameters
--> $DIR/auxiliary/cross-crate.rs:5:14 --> $DIR/auxiliary/cross-crate.rs:5:14
| |
LL | pub const fn foo() {} LL | pub const fn foo() {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - foo::<true>();
LL + foo();
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params-cross-crate.rs:9:12 --> $DIR/no-explicit-const-params-cross-crate.rs:9:12

View file

@ -16,18 +16,15 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
--> $DIR/no-explicit-const-params.rs:22:5 --> $DIR/no-explicit-const-params.rs:22:5
| |
LL | foo::<false>(); LL | foo::<false>();
| ^^^ expected 0 generic arguments | ^^^--------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: function defined here, with 0 generic parameters note: function defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:3:10 --> $DIR/no-explicit-const-params.rs:3:10
| |
LL | const fn foo() {} LL | const fn foo() {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - foo::<false>();
LL + foo();
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:24:12 --> $DIR/no-explicit-const-params.rs:24:12
@ -58,18 +55,15 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
--> $DIR/no-explicit-const-params.rs:15:5 --> $DIR/no-explicit-const-params.rs:15:5
| |
LL | foo::<true>(); LL | foo::<true>();
| ^^^ expected 0 generic arguments | ^^^-------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: function defined here, with 0 generic parameters note: function defined here, with 0 generic parameters
--> $DIR/no-explicit-const-params.rs:3:10 --> $DIR/no-explicit-const-params.rs:3:10
| |
LL | const fn foo() {} LL | const fn foo() {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - foo::<true>();
LL + foo();
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/no-explicit-const-params.rs:17:12 --> $DIR/no-explicit-const-params.rs:17:12

View file

@ -2,35 +2,29 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/seq-args.rs:4:13 --> $DIR/seq-args.rs:4:13
| |
LL | impl<T> Seq<T> for Vec<T> { LL | impl<T> Seq<T> for Vec<T> {
| ^^^ expected 0 generic arguments | ^^^--- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/seq-args.rs:2:11 --> $DIR/seq-args.rs:2:11
| |
LL | trait Seq { } LL | trait Seq { }
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - impl<T> Seq<T> for Vec<T> {
LL + impl<T> Seq for Vec<T> {
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/seq-args.rs:9:10 --> $DIR/seq-args.rs:9:10
| |
LL | impl Seq<bool> for u32 { LL | impl Seq<bool> for u32 {
| ^^^ expected 0 generic arguments | ^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/seq-args.rs:2:11 --> $DIR/seq-args.rs:2:11
| |
LL | trait Seq { } LL | trait Seq { }
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - impl Seq<bool> for u32 {
LL + impl Seq for u32 {
|
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -8,18 +8,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/struct-path-associated-type.rs:14:16 --> $DIR/struct-path-associated-type.rs:14:16
| |
LL | let z = T::A::<u8> {}; LL | let z = T::A::<u8> {};
| ^ expected 0 generic arguments | ^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/struct-path-associated-type.rs:4:10 --> $DIR/struct-path-associated-type.rs:4:10
| |
LL | type A; LL | type A;
| ^ | ^
help: remove the unnecessary generics
|
LL - let z = T::A::<u8> {};
LL + let z = T::A {};
|
error[E0071]: expected struct, variant or union type, found associated type error[E0071]: expected struct, variant or union type, found associated type
--> $DIR/struct-path-associated-type.rs:14:13 --> $DIR/struct-path-associated-type.rs:14:13
@ -37,18 +34,15 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
--> $DIR/struct-path-associated-type.rs:25:16 --> $DIR/struct-path-associated-type.rs:25:16
| |
LL | let z = T::A::<u8> {}; LL | let z = T::A::<u8> {};
| ^ expected 0 generic arguments | ^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated type defined here, with 0 generic parameters note: associated type defined here, with 0 generic parameters
--> $DIR/struct-path-associated-type.rs:4:10 --> $DIR/struct-path-associated-type.rs:4:10
| |
LL | type A; LL | type A;
| ^ | ^
help: remove the unnecessary generics
|
LL - let z = T::A::<u8> {};
LL + let z = T::A {};
|
error[E0223]: ambiguous associated type error[E0223]: ambiguous associated type
--> $DIR/struct-path-associated-type.rs:32:13 --> $DIR/struct-path-associated-type.rs:32:13

View file

@ -68,18 +68,15 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
--> $DIR/structure-constructor-type-mismatch.rs:48:15 --> $DIR/structure-constructor-type-mismatch.rs:48:15
| |
LL | let pt3 = PointF::<i32> { LL | let pt3 = PointF::<i32> {
| ^^^^^^ expected 0 generic arguments | ^^^^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/structure-constructor-type-mismatch.rs:6:6 --> $DIR/structure-constructor-type-mismatch.rs:6:6
| |
LL | type PointF = Point<f32>; LL | type PointF = Point<f32>;
| ^^^^^^ | ^^^^^^
help: remove the unnecessary generics
|
LL - let pt3 = PointF::<i32> {
LL + let pt3 = PointF {
|
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:49:12 --> $DIR/structure-constructor-type-mismatch.rs:49:12
@ -107,18 +104,15 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
--> $DIR/structure-constructor-type-mismatch.rs:54:9 --> $DIR/structure-constructor-type-mismatch.rs:54:9
| |
LL | PointF::<u32> { .. } => {} LL | PointF::<u32> { .. } => {}
| ^^^^^^ expected 0 generic arguments | ^^^^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/structure-constructor-type-mismatch.rs:6:6 --> $DIR/structure-constructor-type-mismatch.rs:6:6
| |
LL | type PointF = Point<f32>; LL | type PointF = Point<f32>;
| ^^^^^^ | ^^^^^^
help: remove the unnecessary generics
|
LL - PointF::<u32> { .. } => {}
LL + PointF { .. } => {}
|
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:54:9 --> $DIR/structure-constructor-type-mismatch.rs:54:9

View file

@ -2,18 +2,15 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/issue-101421.rs:10:8 --> $DIR/issue-101421.rs:10:8
| |
LL | ().f::<()>(()); LL | ().f::<()>(());
| ^ expected 0 generic arguments | ^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: method defined here, with 0 generic parameters note: method defined here, with 0 generic parameters
--> $DIR/issue-101421.rs:2:8 --> $DIR/issue-101421.rs:2:8
| |
LL | fn f(&self, _: ()); LL | fn f(&self, _: ());
| ^ | ^
help: remove the unnecessary generics
|
LL - ().f::<()>(());
LL + ().f(());
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,18 +2,15 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/issue-104287.rs:10:5 --> $DIR/issue-104287.rs:10:5
| |
LL | foo::<()>(x); LL | foo::<()>(x);
| ^^^ expected 0 generic arguments | ^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: method defined here, with 0 generic parameters note: method defined here, with 0 generic parameters
--> $DIR/issue-104287.rs:6:8 --> $DIR/issue-104287.rs:6:8
| |
LL | fn foo(&self) {} LL | fn foo(&self) {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - foo::<()>(x);
LL + foo(x);
|
error[E0425]: cannot find function `foo` in this scope error[E0425]: cannot find function `foo` in this scope
--> $DIR/issue-104287.rs:10:5 --> $DIR/issue-104287.rs:10:5

View file

@ -46,18 +46,15 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
--> $DIR/issue-89064.rs:27:21 --> $DIR/issue-89064.rs:27:21
| |
LL | let _ = A::<S>::foo::<S>(); LL | let _ = A::<S>::foo::<S>();
| ^^^ expected 0 generic arguments | ^^^----- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: associated function defined here, with 0 generic parameters note: associated function defined here, with 0 generic parameters
--> $DIR/issue-89064.rs:4:8 --> $DIR/issue-89064.rs:4:8
| |
LL | fn foo() {} LL | fn foo() {}
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - let _ = A::<S>::foo::<S>();
LL + let _ = A::<S>::foo();
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-89064.rs:31:16 --> $DIR/issue-89064.rs:31:16

View file

@ -117,18 +117,15 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
--> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:40:58 --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:40:58
| |
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, U> {}
| ^^^^^^ expected 1 generic argument | ^^^^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: struct defined here, with 1 generic parameter: `T` note: struct defined here, with 1 generic parameter: `T`
--> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:8 --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:8
| |
LL | struct Struct<T: Trait<u32, String>> { LL | struct Struct<T: Trait<u32, String>> {
| ^^^^^^ - | ^^^^^^ -
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> {}
|
error: aborting due to 9 previous errors error: aborting due to 9 previous errors

View file

@ -8,18 +8,15 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
--> $DIR/vs-lifetime.rs:11:12 --> $DIR/vs-lifetime.rs:11:12
| |
LL | let _: S<'static, 'static>; LL | let _: S<'static, 'static>;
| ^ expected 1 lifetime argument | ^ --------- help: remove the lifetime argument
| |
| expected 1 lifetime argument
| |
note: struct defined here, with 1 lifetime parameter: `'a` note: struct defined here, with 1 lifetime parameter: `'a`
--> $DIR/vs-lifetime.rs:4:8 --> $DIR/vs-lifetime.rs:4:8
| |
LL | struct S<'a, T>(&'a u8, T); LL | struct S<'a, T>(&'a u8, T);
| ^ -- | ^ --
help: remove the lifetime argument
|
LL - let _: S<'static, 'static>;
LL + let _: S<'static>;
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> $DIR/vs-lifetime.rs:11:12 --> $DIR/vs-lifetime.rs:11:12

View file

@ -2,35 +2,29 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/test-2.rs:9:8 --> $DIR/test-2.rs:9:8
| |
LL | 10.dup::<i32>(); LL | 10.dup::<i32>();
| ^^^ expected 0 generic arguments | ^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: method defined here, with 0 generic parameters note: method defined here, with 0 generic parameters
--> $DIR/test-2.rs:4:16 --> $DIR/test-2.rs:4:16
| |
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| ^^^ | ^^^
help: remove the unnecessary generics
|
LL - 10.dup::<i32>();
LL + 10.dup();
|
error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied
--> $DIR/test-2.rs:11:8 --> $DIR/test-2.rs:11:8
| |
LL | 10.blah::<i32, i32>(); LL | 10.blah::<i32, i32>();
| ^^^^ expected 1 generic argument | ^^^^ ----- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: method defined here, with 1 generic parameter: `X` note: method defined here, with 1 generic parameter: `X`
--> $DIR/test-2.rs:4:39 --> $DIR/test-2.rs:4:39
| |
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); } LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
| ^^^^ - | ^^^^ -
help: remove the unnecessary generic argument
|
LL - 10.blah::<i32, i32>();
LL + 10.blah::<i32>();
|
error[E0038]: the trait `bar` cannot be made into an object error[E0038]: the trait `bar` cannot be made into an object
--> $DIR/test-2.rs:13:22 --> $DIR/test-2.rs:13:22

View file

@ -3,15 +3,13 @@ error[E0107]: trait takes at most 2 generic arguments but 5 generic arguments we
| |
LL | Dst: BikeshedIntrinsicFrom< LL | Dst: BikeshedIntrinsicFrom<
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments | ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
| LL | Src,
help: remove the unnecessary generic arguments LL | ASSUME_ALIGNMENT,
| | _____________________________-
LL - ASSUME_ALIGNMENT, LL | | ASSUME_LIFETIMES,
LL - ASSUME_LIFETIMES, LL | | ASSUME_VALIDITY,
LL - ASSUME_VALIDITY, LL | | ASSUME_VISIBILITY,
LL - ASSUME_VISIBILITY, | |_____________________________- help: remove the unnecessary generic arguments
LL + ASSUME_ALIGNMENT,
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -308,35 +308,29 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
--> $DIR/enum-variant-generic-args.rs:64:5 --> $DIR/enum-variant-generic-args.rs:64:5
| |
LL | AliasFixed::<()>::TSVariant(()); LL | AliasFixed::<()>::TSVariant(());
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::TSVariant(());
LL + AliasFixed::TSVariant(());
|
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/enum-variant-generic-args.rs:66:5 --> $DIR/enum-variant-generic-args.rs:66:5
| |
LL | AliasFixed::<()>::TSVariant::<()>(()); LL | AliasFixed::<()>::TSVariant::<()>(());
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::TSVariant::<()>(());
LL + AliasFixed::TSVariant::<()>(());
|
error[E0109]: type arguments are not allowed on this type error[E0109]: type arguments are not allowed on this type
--> $DIR/enum-variant-generic-args.rs:66:35 --> $DIR/enum-variant-generic-args.rs:66:35
@ -405,35 +399,29 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
--> $DIR/enum-variant-generic-args.rs:82:5 --> $DIR/enum-variant-generic-args.rs:82:5
| |
LL | AliasFixed::<()>::SVariant { v: () }; LL | AliasFixed::<()>::SVariant { v: () };
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::SVariant { v: () };
LL + AliasFixed::SVariant { v: () };
|
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/enum-variant-generic-args.rs:84:5 --> $DIR/enum-variant-generic-args.rs:84:5
| |
LL | AliasFixed::<()>::SVariant::<()> { v: () }; LL | AliasFixed::<()>::SVariant::<()> { v: () };
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::SVariant::<()> { v: () };
LL + AliasFixed::SVariant::<()> { v: () };
|
error[E0109]: type arguments are not allowed on this type error[E0109]: type arguments are not allowed on this type
--> $DIR/enum-variant-generic-args.rs:84:34 --> $DIR/enum-variant-generic-args.rs:84:34
@ -486,35 +474,29 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
--> $DIR/enum-variant-generic-args.rs:100:5 --> $DIR/enum-variant-generic-args.rs:100:5
| |
LL | AliasFixed::<()>::UVariant; LL | AliasFixed::<()>::UVariant;
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::UVariant;
LL + AliasFixed::UVariant;
|
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/enum-variant-generic-args.rs:102:5 --> $DIR/enum-variant-generic-args.rs:102:5
| |
LL | AliasFixed::<()>::UVariant::<()>; LL | AliasFixed::<()>::UVariant::<()>;
| ^^^^^^^^^^ expected 0 generic arguments | ^^^^^^^^^^------ help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: type alias defined here, with 0 generic parameters note: type alias defined here, with 0 generic parameters
--> $DIR/enum-variant-generic-args.rs:9:6 --> $DIR/enum-variant-generic-args.rs:9:6
| |
LL | type AliasFixed = Enum<()>; LL | type AliasFixed = Enum<()>;
| ^^^^^^^^^^ | ^^^^^^^^^^
help: remove the unnecessary generics
|
LL - AliasFixed::<()>::UVariant::<()>;
LL + AliasFixed::UVariant::<()>;
|
error[E0109]: type arguments are not allowed on this type error[E0109]: type arguments are not allowed on this type
--> $DIR/enum-variant-generic-args.rs:102:34 --> $DIR/enum-variant-generic-args.rs:102:34

View file

@ -2,99 +2,69 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/typeck-builtin-bound-type-parameters.rs:1:11 --> $DIR/typeck-builtin-bound-type-parameters.rs:1:11
| |
LL | fn foo1<T:Copy<U>, U>(x: T) {} LL | fn foo1<T:Copy<U>, U>(x: T) {}
| ^^^^ expected 0 generic arguments | ^^^^--- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - fn foo1<T:Copy<U>, U>(x: T) {}
LL + fn foo1<T:Copy, U>(x: T) {}
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14 --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
| |
LL | trait Trait: Copy<dyn Send> {} LL | trait Trait: Copy<dyn Send> {}
| ^^^^ expected 0 generic arguments | ^^^^---------- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - trait Trait: Copy<dyn Send> {}
LL + trait Trait: Copy {}
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14 --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
| |
LL | trait Trait: Copy<dyn Send> {} LL | trait Trait: Copy<dyn Send> {}
| ^^^^ expected 0 generic arguments | ^^^^---------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: remove the unnecessary generics
|
LL - trait Trait: Copy<dyn Send> {}
LL + trait Trait: Copy {}
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14 --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
| |
LL | trait Trait: Copy<dyn Send> {} LL | trait Trait: Copy<dyn Send> {}
| ^^^^ expected 0 generic arguments | ^^^^---------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: remove the unnecessary generics
|
LL - trait Trait: Copy<dyn Send> {}
LL + trait Trait: Copy {}
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:9:21 --> $DIR/typeck-builtin-bound-type-parameters.rs:9:21
| |
LL | struct MyStruct1<T: Copy<T>>(T); LL | struct MyStruct1<T: Copy<T>>(T);
| ^^^^ expected 0 generic arguments | ^^^^--- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 generic arguments
|
LL - struct MyStruct1<T: Copy<T>>(T);
LL + struct MyStruct1<T: Copy>(T);
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:12:25 --> $DIR/typeck-builtin-bound-type-parameters.rs:12:25
| |
LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T); LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T);
| ^^^^ expected 0 lifetime arguments | ^^^^---- help: remove the unnecessary generics
| | |
help: remove the unnecessary generics | expected 0 lifetime arguments
|
LL - struct MyStruct2<'a, T: Copy<'a>>(&'a T);
LL + struct MyStruct2<'a, T: Copy>(&'a T);
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:15:15 --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
| |
LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
| ^^^^ expected 0 lifetime arguments | ^^^^ -- help: remove the lifetime argument
| | |
help: remove the lifetime argument | expected 0 lifetime arguments
|
LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
LL + fn foo2<'a, T:Copy<, U>, U>(x: T) {}
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/typeck-builtin-bound-type-parameters.rs:15:15 --> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
| |
LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {} LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
| ^^^^ expected 0 generic arguments | ^^^^ - help: remove the unnecessary generic argument
| | |
help: remove the unnecessary generic argument | expected 0 generic arguments
|
LL - fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
LL + fn foo2<'a, T:Copy<'a, >, U>(x: T) {}
|
error: aborting due to 8 previous errors error: aborting due to 8 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
--> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12 --> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12
| |
LL | let c: Foo<_, _> = Foo { r: &5 }; LL | let c: Foo<_, _> = Foo { r: &5 };
| ^^^ expected 1 generic argument | ^^^ --- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: struct defined here, with 1 generic parameter: `T` note: struct defined here, with 1 generic parameter: `T`
--> $DIR/typeck_type_placeholder_lifetime_1.rs:4:8 --> $DIR/typeck_type_placeholder_lifetime_1.rs:4:8
| |
LL | struct Foo<'a, T:'a> { LL | struct Foo<'a, T:'a> {
| ^^^ - | ^^^ -
help: remove the unnecessary generic argument
|
LL - let c: Foo<_, _> = Foo { r: &5 };
LL + let c: Foo<_> = Foo { r: &5 };
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -2,18 +2,15 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
--> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12 --> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12
| |
LL | let c: Foo<_, usize> = Foo { r: &5 }; LL | let c: Foo<_, usize> = Foo { r: &5 };
| ^^^ expected 1 generic argument | ^^^ ------- help: remove the unnecessary generic argument
| |
| expected 1 generic argument
| |
note: struct defined here, with 1 generic parameter: `T` note: struct defined here, with 1 generic parameter: `T`
--> $DIR/typeck_type_placeholder_lifetime_2.rs:4:8 --> $DIR/typeck_type_placeholder_lifetime_2.rs:4:8
| |
LL | struct Foo<'a, T:'a> { LL | struct Foo<'a, T:'a> {
| ^^^ - | ^^^ -
help: remove the unnecessary generic argument
|
LL - let c: Foo<_, usize> = Foo { r: &5 };
LL + let c: Foo<_> = Foo { r: &5 };
|
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -34,18 +34,15 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
--> $DIR/ufcs-qpath-missing-params.rs:17:26 --> $DIR/ufcs-qpath-missing-params.rs:17:26
| |
LL | <String as IntoCow>::into_cow::<str>("foo".to_string()); LL | <String as IntoCow>::into_cow::<str>("foo".to_string());
| ^^^^^^^^ expected 0 generic arguments | ^^^^^^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: method defined here, with 0 generic parameters note: method defined here, with 0 generic parameters
--> $DIR/ufcs-qpath-missing-params.rs:4:8 --> $DIR/ufcs-qpath-missing-params.rs:4:8
| |
LL | fn into_cow(self) -> Cow<'a, B>; LL | fn into_cow(self) -> Cow<'a, B>;
| ^^^^^^^^ | ^^^^^^^^
help: remove the unnecessary generics
|
LL - <String as IntoCow>::into_cow::<str>("foo".to_string());
LL + <String as IntoCow>::into_cow("foo".to_string());
|
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View file

@ -2,18 +2,15 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
| |
LL | fn foo1(_: &dyn Zero()) { LL | fn foo1(_: &dyn Zero()) {
| ^^^^ expected 0 generic arguments | ^^^^-- help: remove the unnecessary parenthetical generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
| |
LL | trait Zero { fn dummy(&self); } LL | trait Zero { fn dummy(&self); }
| ^^^^ | ^^^^
help: remove the unnecessary parenthetical generics
|
LL - fn foo1(_: &dyn Zero()) {
LL + fn foo1(_: &dyn Zero) {
|
error[E0220]: associated type `Output` not found for `Zero` error[E0220]: associated type `Output` not found for `Zero`
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
@ -25,52 +22,43 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:10:17
| |
LL | fn foo2(_: &dyn Zero<usize>) { LL | fn foo2(_: &dyn Zero<usize>) {
| ^^^^ expected 0 generic arguments | ^^^^------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
| |
LL | trait Zero { fn dummy(&self); } LL | trait Zero { fn dummy(&self); }
| ^^^^ | ^^^^
help: remove the unnecessary generics
|
LL - fn foo2(_: &dyn Zero<usize>) {
LL + fn foo2(_: &dyn Zero) {
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:17
| |
LL | fn foo3(_: &dyn Zero < usize >) { LL | fn foo3(_: &dyn Zero < usize >) {
| ^^^^ expected 0 generic arguments | ^^^^-------------- help: remove the unnecessary generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
| |
LL | trait Zero { fn dummy(&self); } LL | trait Zero { fn dummy(&self); }
| ^^^^ | ^^^^
help: remove the unnecessary generics
|
LL - fn foo3(_: &dyn Zero < usize >) {
LL + fn foo3(_: &dyn Zero) {
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
| |
LL | fn foo4(_: &dyn Zero(usize)) { LL | fn foo4(_: &dyn Zero(usize)) {
| ^^^^ expected 0 generic arguments | ^^^^------- help: remove the unnecessary parenthetical generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
| |
LL | trait Zero { fn dummy(&self); } LL | trait Zero { fn dummy(&self); }
| ^^^^ | ^^^^
help: remove the unnecessary parenthetical generics
|
LL - fn foo4(_: &dyn Zero(usize)) {
LL + fn foo4(_: &dyn Zero) {
|
error[E0220]: associated type `Output` not found for `Zero` error[E0220]: associated type `Output` not found for `Zero`
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
@ -82,18 +70,15 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
| |
LL | fn foo5(_: &dyn Zero ( usize )) { LL | fn foo5(_: &dyn Zero ( usize )) {
| ^^^^ expected 0 generic arguments | ^^^^-------------- help: remove the unnecessary parenthetical generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
| |
LL | trait Zero { fn dummy(&self); } LL | trait Zero { fn dummy(&self); }
| ^^^^ | ^^^^
help: remove the unnecessary parenthetical generics
|
LL - fn foo5(_: &dyn Zero ( usize )) {
LL + fn foo5(_: &dyn Zero) {
|
error[E0220]: associated type `Output` not found for `Zero` error[E0220]: associated type `Output` not found for `Zero`
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17 --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17

View file

@ -2,18 +2,15 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8 --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8
| |
LL | fn f<F:Trait(isize) -> isize>(x: F) {} LL | fn f<F:Trait(isize) -> isize>(x: F) {}
| ^^^^^ expected 0 generic arguments | ^^^^^------- help: remove the unnecessary parenthetical generics
| |
| expected 0 generic arguments
| |
note: trait defined here, with 0 generic parameters note: trait defined here, with 0 generic parameters
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:3:7 --> $DIR/unboxed-closure-sugar-wrong-trait.rs:3:7
| |
LL | trait Trait {} LL | trait Trait {}
| ^^^^^ | ^^^^^
help: remove the unnecessary parenthetical generics
|
LL - fn f<F:Trait(isize) -> isize>(x: F) {}
LL + fn f<F:Trait -> isize>(x: F) {}
|
error[E0220]: associated type `Output` not found for `Trait` error[E0220]: associated type `Output` not found for `Trait`
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24 --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24