Use verbose suggestion for "wrong # of generics"
This commit is contained in:
parent
2a1c384f0e
commit
c807ac0340
@ -888,7 +888,7 @@ fn suggest_moving_args_from_assoc_fn_to_trait_for_method_call(
|
||||
let comma = if args.len() > 0 { ", " } else { "" };
|
||||
let trait_path = self.tcx.def_path_str(trait_def_id);
|
||||
let method_name = self.tcx.item_name(self.def_id);
|
||||
err.span_suggestion(
|
||||
err.span_suggestion_verbose(
|
||||
expr.span,
|
||||
msg,
|
||||
format!("{trait_path}::{generics}::{method_name}({rcvr}{comma}{rest})"),
|
||||
@ -952,7 +952,7 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
|
||||
s = pluralize!(num_redundant_lt_args),
|
||||
);
|
||||
|
||||
err.span_suggestion(
|
||||
err.span_suggestion_verbose(
|
||||
span_redundant_lt_args,
|
||||
msg_lifetimes,
|
||||
"",
|
||||
@ -994,7 +994,7 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
|
||||
s = pluralize!(num_redundant_gen_args),
|
||||
);
|
||||
|
||||
err.span_suggestion(
|
||||
err.span_suggestion_verbose(
|
||||
span_redundant_type_or_const_args,
|
||||
msg_types_or_consts,
|
||||
"",
|
||||
@ -1044,7 +1044,7 @@ fn suggest_removing_args_or_generics(&self, err: &mut Diag<'_, impl EmissionGuar
|
||||
},
|
||||
);
|
||||
|
||||
err.span_suggestion(span, msg, "", Applicability::MaybeIncorrect);
|
||||
err.span_suggestion_verbose(span, msg, "", Applicability::MaybeIncorrect);
|
||||
} else if redundant_lifetime_args && redundant_type_or_const_args {
|
||||
remove_lifetime_args(err);
|
||||
remove_type_or_const_args(err);
|
||||
|
@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:26
|
||||
|
|
||||
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:2:10
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
help: remove these 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
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:26
|
||||
@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:26
|
||||
|
|
||||
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:2:10
|
||||
@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:26
|
||||
@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:26
|
||||
|
|
||||
LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:2:10
|
||||
@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/invalid_const_in_lifetime_position.rs:4:20
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
|
||||
--> $DIR/mismatched_arg_count.rs:7:29
|
||||
|
|
||||
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
||||
| ^^^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: type alias defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/mismatched_arg_count.rs:5:6
|
||||
|
|
||||
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
|
||||
| ^^^^^ --
|
||||
help: remove this 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
|
||||
|
||||
|
@ -2,9 +2,7 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
|
||||
--> $DIR/issue-100154.rs:4:5
|
||||
|
|
||||
LL | foo::<()>(());
|
||||
| ^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/issue-100154.rs:1:4
|
||||
@ -12,6 +10,11 @@ note: function defined here, with 0 generic parameters
|
||||
LL | fn foo(i: impl std::fmt::Display) {}
|
||||
| ^^^
|
||||
= note: `impl Trait` cannot be explicitly specified as a generic argument
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<()>(());
|
||||
LL + foo(());
|
||||
|
|
||||
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/issue-100154.rs:4:11
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||
|
|
||||
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
||||
| ^^^^^^^^^^^^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^^^^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
|
||||
|
|
||||
LL | struct LockedMarket<T>(T);
|
||||
| ^^^^^^^^^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||
@ -32,9 +35,7 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||
|
|
||||
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
||||
| ^^^^^^^^^^^^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^^^^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
|
||||
@ -42,6 +43,11 @@ note: struct defined here, with 0 lifetime parameters
|
||||
LL | struct LockedMarket<T>(T);
|
||||
| ^^^^^^^^^^^^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||
|
@ -2,9 +2,13 @@ error[E0107]: trait takes at most 2 generic arguments but 3 generic arguments we
|
||||
--> $DIR/transmutable-ice-110969.rs:11:14
|
||||
|
|
||||
LL | Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ------ help: remove this generic argument
|
||||
| |
|
||||
| expected at most 2 generic arguments
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
|
||||
|
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME>,
|
||||
LL + Dst: BikeshedIntrinsicFrom<Src, Context, >,
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/transmutable-ice-110969.rs:25:74
|
||||
|
@ -23,15 +23,18 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
|
||||
--> $DIR/infer-arg-test.rs:18:10
|
||||
|
|
||||
LL | let a: All<_, _, _>;
|
||||
| ^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
| ^^^ expected 2 generic arguments
|
||||
|
|
||||
note: struct defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/infer-arg-test.rs:3:8
|
||||
|
|
||||
LL | struct All<'a, T, const N: usize> {
|
||||
| ^^^ - --------------
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - let a: All<_, _, _>;
|
||||
LL + let a: All<_, _, >;
|
||||
|
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
|
||||
--> $DIR/issue_114151.rs:17:5
|
||||
|
|
||||
LL | foo::<_, L>([(); L + 1 + L]);
|
||||
| ^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: function defined here, with 1 generic parameter: `N`
|
||||
--> $DIR/issue_114151.rs:4:4
|
||||
|
|
||||
LL | fn foo<const N: usize>(
|
||||
| ^^^ --------------
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - foo::<_, L>([(); L + 1 + L]);
|
||||
LL + foo::<_, >([(); L + 1 + L]);
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue_114151.rs:17:18
|
||||
|
@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/issue-102768.rs:9:30
|
||||
|
|
||||
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/issue-102768.rs:5:10
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
help: remove these 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
|
||||
--> $DIR/issue-102768.rs:9:30
|
||||
@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/issue-102768.rs:9:30
|
||||
|
|
||||
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/issue-102768.rs:5:10
|
||||
@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/issue-102768.rs:9:30
|
||||
@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/issue-102768.rs:9:30
|
||||
|
|
||||
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/issue-102768.rs:5:10
|
||||
@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/issue-102768.rs:9:24
|
||||
|
@ -20,15 +20,18 @@ error[E0107]: function takes 2 generic arguments but 3 generic arguments were su
|
||||
--> $DIR/incorrect-number-of-const-args.rs:9:5
|
||||
|
|
||||
LL | foo::<0, 0, 0>();
|
||||
| ^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
| ^^^ expected 2 generic arguments
|
||||
|
|
||||
note: function defined here, with 2 generic parameters: `X`, `Y`
|
||||
--> $DIR/incorrect-number-of-const-args.rs:1:4
|
||||
|
|
||||
LL | fn foo<const X: usize, const Y: usize>() -> usize {
|
||||
| ^^^ -------------- --------------
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - foo::<0, 0, 0>();
|
||||
LL + foo::<0, 0, >();
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -27,15 +27,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/invalid-const-arg-for-type-param.rs:12:5
|
||||
|
|
||||
LL | S::<0>;
|
||||
| ^----- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/invalid-const-arg-for-type-param.rs:3:8
|
||||
|
|
||||
LL | struct S;
|
||||
| ^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - S::<0>;
|
||||
LL + S;
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -2,9 +2,13 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
|
||||
--> $DIR/invalid-constant-in-args.rs:4:12
|
||||
|
|
||||
LL | let _: Cell<&str, "a"> = Cell::new("");
|
||||
| ^^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^ expected 1 generic argument
|
||||
|
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - let _: Cell<&str, "a"> = Cell::new("");
|
||||
LL + let _: Cell<&str, > = Cell::new("");
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -20,15 +20,18 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
|
||||
--> $DIR/constructor-lifetime-args.rs:19:5
|
||||
|
|
||||
LL | S::<'static, 'static, 'static>(&0, &0);
|
||||
| ^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 2 lifetime arguments
|
||||
| ^ expected 2 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/constructor-lifetime-args.rs:9:8
|
||||
|
|
||||
LL | struct S<'a, 'b>(&'a u8, &'b u8);
|
||||
| ^ -- --
|
||||
help: remove this 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
|
||||
--> $DIR/constructor-lifetime-args.rs:22:8
|
||||
@ -52,15 +55,18 @@ error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supp
|
||||
--> $DIR/constructor-lifetime-args.rs:24:8
|
||||
|
|
||||
LL | E::V::<'static, 'static, 'static>(&0);
|
||||
| ^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 2 lifetime arguments
|
||||
| ^ expected 2 lifetime arguments
|
||||
|
|
||||
note: enum defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/constructor-lifetime-args.rs:10:6
|
||||
|
|
||||
LL | enum E<'a, 'b> {
|
||||
| ^ -- --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - E::V::<'static, 'static, 'static>(&0);
|
||||
LL + E::V::<'static, 'static, >(&0);
|
||||
|
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
@ -2,33 +2,49 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/effect_param.rs:11:9
|
||||
|
|
||||
LL | i8::checked_sub::<false>(42, 43);
|
||||
| ^^^^^^^^^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/effect_param.rs:13:9
|
||||
|
|
||||
LL | i8::checked_sub::<true>(42, 43);
|
||||
| ^^^^^^^^^^^-------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/effect_param.rs:4:9
|
||||
|
|
||||
LL | i8::checked_sub::<true>(42, 43);
|
||||
| ^^^^^^^^^^^-------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/effect_param.rs:6:9
|
||||
|
|
||||
LL | i8::checked_sub::<false>(42, 43);
|
||||
| ^^^^^^^^^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
LL - i8::checked_sub::<false>(42, 43);
|
||||
LL + i8::checked_sub(42, 43);
|
||||
|
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
@ -20,113 +20,137 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
|
||||
--> $DIR/E0107.rs:17:10
|
||||
|
|
||||
LL | bar: Bar<'a>,
|
||||
| ^^^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: enum defined here, with 0 lifetime parameters
|
||||
--> $DIR/E0107.rs:6:6
|
||||
|
|
||||
LL | enum Bar {
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - bar: Bar<'a>,
|
||||
LL + bar: Bar,
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||
--> $DIR/E0107.rs:21:11
|
||||
|
|
||||
LL | foo2: Foo<'a, 'b, 'c>,
|
||||
| ^^^ ------ help: remove these lifetime arguments
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:1:8
|
||||
|
|
||||
LL | struct Foo<'a>(&'a str);
|
||||
| ^^^ --
|
||||
help: remove these 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
|
||||
--> $DIR/E0107.rs:25:11
|
||||
|
|
||||
LL | qux1: Qux<'a, 'b, i32>,
|
||||
| ^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:3:8
|
||||
|
|
||||
LL | struct Qux<'a, T>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/E0107.rs:29:11
|
||||
|
|
||||
LL | qux2: Qux<'a, i32, 'b>,
|
||||
| ^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:3:8
|
||||
|
|
||||
LL | struct Qux<'a, T>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - qux2: Qux<'a, i32, 'b>,
|
||||
LL + qux2: Qux<'a, i32, >,
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||
--> $DIR/E0107.rs:33:11
|
||||
|
|
||||
LL | qux3: Qux<'a, 'b, 'c, i32>,
|
||||
| ^^^ ------ help: remove these lifetime arguments
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:3:8
|
||||
|
|
||||
LL | struct Qux<'a, T>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove these 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
|
||||
--> $DIR/E0107.rs:37:11
|
||||
|
|
||||
LL | qux4: Qux<'a, i32, 'b, 'c>,
|
||||
| ^^^ ------ help: remove these lifetime arguments
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:3:8
|
||||
|
|
||||
LL | struct Qux<'a, T>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove these lifetime arguments
|
||||
|
|
||||
LL - qux4: Qux<'a, i32, 'b, 'c>,
|
||||
LL + qux4: Qux<'a, i32, >,
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||
--> $DIR/E0107.rs:41:11
|
||||
|
|
||||
LL | qux5: Qux<'a, 'b, i32, 'c>,
|
||||
| ^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/E0107.rs:3:8
|
||||
|
|
||||
LL | struct Qux<'a, T>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/E0107.rs:45:11
|
||||
|
|
||||
LL | quux: Quux<'a, i32, 'b>,
|
||||
| ^^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/E0107.rs:4:8
|
||||
|
|
||||
LL | struct Quux<T>(T);
|
||||
| ^^^^
|
||||
help: remove this 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
|
||||
--> $DIR/E0107.rs:55:27
|
||||
|
@ -43,15 +43,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
help: remove these 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
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||
@ -74,9 +77,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8
|
||||
@ -84,6 +85,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||
@ -106,9 +112,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:2:8
|
||||
@ -116,6 +120,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:29
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: associated type takes 1 lifetime argument but 2 lifetime arguments
|
||||
--> $DIR/parameter_number_and_kind.rs:11:24
|
||||
|
|
||||
LL | type FErr1 = Self::E<'static, 'static>;
|
||||
| ^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/parameter_number_and_kind.rs:8:10
|
||||
|
|
||||
LL | type E<'a, T>;
|
||||
| ^ --
|
||||
help: remove this 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
|
||||
--> $DIR/parameter_number_and_kind.rs:11:24
|
||||
@ -32,15 +35,18 @@ error[E0107]: associated type takes 1 generic argument but 2 generic arguments w
|
||||
--> $DIR/parameter_number_and_kind.rs:14:27
|
||||
|
|
||||
LL | type FErr2<T> = Self::E<'static, T, u32>;
|
||||
| ^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^ expected 1 generic argument
|
||||
|
|
||||
note: associated type defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/parameter_number_and_kind.rs:8:10
|
||||
|
|
||||
LL | type E<'a, T>;
|
||||
| ^ -
|
||||
help: remove this 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
|
||||
|
||||
|
@ -18,15 +18,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||
|
|
||||
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:2:10
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
help: remove these 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
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||
@ -49,9 +52,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||
|
|
||||
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:2:10
|
||||
@ -59,6 +60,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||
@ -81,9 +87,7 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||
|
|
||||
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||
| ^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:2:10
|
||||
@ -91,6 +95,11 @@ note: associated type defined here, with 0 generic parameters
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:23
|
||||
|
@ -2,71 +2,86 @@ error[E0107]: associated function takes 1 generic argument but 2 generic argumen
|
||||
--> $DIR/bad-mid-path-type-params.rs:30:16
|
||||
|
|
||||
LL | let _ = S::new::<isize,f64>(1, 1.0);
|
||||
| ^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated function defined here, with 1 generic parameter: `U`
|
||||
--> $DIR/bad-mid-path-type-params.rs:6:8
|
||||
|
|
||||
LL | fn new<U>(x: T, _: U) -> S<T> {
|
||||
| ^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/bad-mid-path-type-params.rs:33:13
|
||||
|
|
||||
LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
|
||||
| ^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/bad-mid-path-type-params.rs:1:8
|
||||
|
|
||||
LL | struct S<T> {
|
||||
| ^
|
||||
help: remove this 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
|
||||
--> $DIR/bad-mid-path-type-params.rs:36:24
|
||||
|
|
||||
LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
|
||||
| ^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated function defined here, with 1 generic parameter: `U`
|
||||
--> $DIR/bad-mid-path-type-params.rs:14:8
|
||||
|
|
||||
LL | fn new<U>(x: T, y: U) -> Self;
|
||||
| ^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/bad-mid-path-type-params.rs:39:17
|
||||
|
|
||||
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
||||
| ^^^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 0 lifetime parameters
|
||||
--> $DIR/bad-mid-path-type-params.rs:13:7
|
||||
|
|
||||
LL | trait Trait<T> {
|
||||
| ^^^^^
|
||||
help: remove this 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
|
||||
--> $DIR/bad-mid-path-type-params.rs:39:36
|
||||
|
|
||||
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
||||
| ^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated function defined here, with 1 generic parameter: `U`
|
||||
--> $DIR/bad-mid-path-type-params.rs:14:8
|
||||
|
|
||||
LL | fn new<U>(x: T, y: U) -> Self;
|
||||
| ^^^ -
|
||||
help: remove this 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
|
||||
|
||||
|
@ -20,15 +20,18 @@ error[E0107]: function takes 1 lifetime argument but 2 lifetime arguments were s
|
||||
--> $DIR/foreign-generic-mismatch.rs:8:31
|
||||
|
|
||||
LL | foreign_generic_mismatch::lt_arg::<'static, 'static>();
|
||||
| ^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: function defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/auxiliary/foreign-generic-mismatch.rs:3:8
|
||||
|
|
||||
LL | pub fn lt_arg<'a: 'a>() {}
|
||||
| ^^^^^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - foreign_generic_mismatch::lt_arg::<'static, 'static>();
|
||||
LL + foreign_generic_mismatch::lt_arg::<'static, >();
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -2,43 +2,52 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:6:5
|
||||
|
|
||||
LL | Foo::<'static, 'static, ()>(&0);
|
||||
| ^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:1:8
|
||||
|
|
||||
LL | struct Foo<'a, T: 'a>(&'a T);
|
||||
| ^^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - Foo::<'static, 'static, ()>(&0);
|
||||
LL + Foo::<'static, , ()>(&0);
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
||||
|
|
||||
LL | Bar::<'static, 'static, ()>(&());
|
||||
| ^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:3:8
|
||||
|
|
||||
LL | struct Bar<'a>(&'a ());
|
||||
| ^^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - Bar::<'static, 'static, ()>(&());
|
||||
LL + Bar::<'static, , ()>(&());
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
||||
|
|
||||
LL | Bar::<'static, 'static, ()>(&());
|
||||
| ^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/generic-arg-mismatch-recover.rs:3:8
|
||||
|
|
||||
LL | struct Bar<'a>(&'a ());
|
||||
| ^^^
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - Bar::<'static, 'static, ()>(&());
|
||||
LL + Bar::<'static, 'static, >(&());
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
|
||||
--> $DIR/generic-impl-more-params-with-defaults.rs:13:5
|
||||
|
|
||||
LL | Vec::<isize, Heap, bool>::new();
|
||||
| ^^^ ---- help: remove this generic argument
|
||||
| |
|
||||
| expected at most 2 generic arguments
|
||||
| ^^^ expected at most 2 generic arguments
|
||||
|
|
||||
note: struct defined here, with at most 2 generic parameters: `T`, `A`
|
||||
--> $DIR/generic-impl-more-params-with-defaults.rs:5:8
|
||||
|
|
||||
LL | struct Vec<T, A = Heap>(
|
||||
| ^^^ - --------
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - Vec::<isize, Heap, bool>::new();
|
||||
LL + Vec::<isize, Heap, >::new();
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments w
|
||||
--> $DIR/generic-type-more-params-with-defaults.rs:9:12
|
||||
|
|
||||
LL | let _: Vec<isize, Heap, bool>;
|
||||
| ^^^ ---- help: remove this generic argument
|
||||
| |
|
||||
| expected at most 2 generic arguments
|
||||
| ^^^ expected at most 2 generic arguments
|
||||
|
|
||||
note: struct defined here, with at most 2 generic parameters: `T`, `A`
|
||||
--> $DIR/generic-type-more-params-with-defaults.rs:5:8
|
||||
|
|
||||
LL | struct Vec<T, A = Heap>(
|
||||
| ^^^ - --------
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - let _: Vec<isize, Heap, bool>;
|
||||
LL + let _: Vec<isize, Heap, >;
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -171,71 +171,86 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
|
||||
--> $DIR/wrong-number-of-args.rs:6:14
|
||||
|
|
||||
LL | type B = Ty<'static>;
|
||||
| ^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/wrong-number-of-args.rs:2:12
|
||||
|
|
||||
LL | struct Ty;
|
||||
| ^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - type B = Ty<'static>;
|
||||
LL + type B = Ty;
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/wrong-number-of-args.rs:10:14
|
||||
|
|
||||
LL | type C = Ty<'static, usize>;
|
||||
| ^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/wrong-number-of-args.rs:2:12
|
||||
|
|
||||
LL | struct Ty;
|
||||
| ^^
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:10:14
|
||||
|
|
||||
LL | type C = Ty<'static, usize>;
|
||||
| ^^ ----- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/wrong-number-of-args.rs:2:12
|
||||
|
|
||||
LL | struct Ty;
|
||||
| ^^
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:16:14
|
||||
|
|
||||
LL | type D = Ty<'static, usize, { 0 }>;
|
||||
| ^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 0 lifetime parameters
|
||||
--> $DIR/wrong-number-of-args.rs:2:12
|
||||
|
|
||||
LL | struct Ty;
|
||||
| ^^
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:16:14
|
||||
|
|
||||
LL | type D = Ty<'static, usize, { 0 }>;
|
||||
| ^^ ------------ help: remove these generic arguments
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/wrong-number-of-args.rs:2:12
|
||||
|
|
||||
LL | struct Ty;
|
||||
| ^^
|
||||
help: remove these generic arguments
|
||||
|
|
||||
LL - type D = Ty<'static, usize, { 0 }>;
|
||||
LL + type D = Ty<'static, >;
|
||||
|
|
||||
|
||||
error[E0107]: missing generics for struct `type_and_type::Ty`
|
||||
--> $DIR/wrong-number-of-args.rs:26:14
|
||||
@ -275,15 +290,18 @@ error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supp
|
||||
--> $DIR/wrong-number-of-args.rs:36:14
|
||||
|
|
||||
LL | type D = Ty<usize, String, char>;
|
||||
| ^^ ---- help: remove this generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
| ^^ expected 2 generic arguments
|
||||
|
|
||||
note: struct defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/wrong-number-of-args.rs:24:12
|
||||
|
|
||||
LL | struct Ty<A, B>(A, B);
|
||||
| ^^ - -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:40:14
|
||||
@ -353,29 +371,35 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
|
||||
--> $DIR/wrong-number-of-args.rs:70:14
|
||||
|
|
||||
LL | type F = Ty<'static, usize, 'static, usize>;
|
||||
| ^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:46:12
|
||||
|
|
||||
LL | struct Ty<'a, T>(&'a T);
|
||||
| ^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - type F = Ty<'static, usize, 'static, usize>;
|
||||
LL + type F = Ty<'static, usize, , usize>;
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
|
||||
--> $DIR/wrong-number-of-args.rs:70:14
|
||||
|
|
||||
LL | type F = Ty<'static, usize, 'static, usize>;
|
||||
| ^^ ----- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^ expected 1 generic argument
|
||||
|
|
||||
note: struct defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/wrong-number-of-args.rs:46:12
|
||||
|
|
||||
LL | struct Ty<'a, T>(&'a T);
|
||||
| ^^ -
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - type F = Ty<'static, usize, 'static, usize>;
|
||||
LL + type F = Ty<'static, usize, 'static, >;
|
||||
|
|
||||
|
||||
error[E0107]: missing generics for struct `type_and_type_and_type::Ty`
|
||||
--> $DIR/wrong-number-of-args.rs:80:14
|
||||
@ -415,15 +439,18 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
|
||||
--> $DIR/wrong-number-of-args.rs:92:14
|
||||
|
|
||||
LL | type E = Ty<usize, String, char, f64>;
|
||||
| ^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected at most 3 generic arguments
|
||||
| ^^ expected at most 3 generic arguments
|
||||
|
|
||||
note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C`
|
||||
--> $DIR/wrong-number-of-args.rs:78:12
|
||||
|
|
||||
LL | struct Ty<A, B, C = &'static str>(A, B, C);
|
||||
| ^^ - - ----------------
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:96:14
|
||||
@ -445,29 +472,35 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
|
||||
--> $DIR/wrong-number-of-args.rs:116:22
|
||||
|
|
||||
LL | type A = Box<dyn NonGeneric<usize>>;
|
||||
| ^^^^^^^^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/wrong-number-of-args.rs:104:11
|
||||
|
|
||||
LL | trait NonGeneric {
|
||||
| ^^^^^^^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/wrong-number-of-args.rs:125:22
|
||||
|
|
||||
LL | type C = Box<dyn GenericLifetime<'static, 'static>>;
|
||||
| ^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^^^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: trait defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:108:11
|
||||
|
|
||||
LL | trait GenericLifetime<'a> {
|
||||
| ^^^^^^^^^^^^^^^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - type C = Box<dyn GenericLifetime<'static, 'static>>;
|
||||
LL + type C = Box<dyn GenericLifetime<'static, >>;
|
||||
|
|
||||
|
||||
error[E0107]: missing generics for trait `GenericType`
|
||||
--> $DIR/wrong-number-of-args.rs:129:22
|
||||
@ -489,15 +522,18 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
|
||||
--> $DIR/wrong-number-of-args.rs:133:22
|
||||
|
|
||||
LL | type E = Box<dyn GenericType<String, usize>>;
|
||||
| ^^^^^^^^^^^ ----- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/wrong-number-of-args.rs:112:11
|
||||
|
|
||||
LL | trait GenericType<A> {
|
||||
| ^^^^^^^^^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:142:22
|
||||
@ -519,43 +555,52 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
|
||||
--> $DIR/wrong-number-of-args.rs:153:26
|
||||
|
|
||||
LL | type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^------------------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/wrong-number-of-args.rs:149:15
|
||||
|
|
||||
LL | trait NonGenericAT {
|
||||
| ^^^^^^^^^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/wrong-number-of-args.rs:168:26
|
||||
|
|
||||
LL | type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: trait defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:159:15
|
||||
|
|
||||
LL | trait GenericLifetimeAT<'a> {
|
||||
| ^^^^^^^^^^^^^^^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:172:26
|
||||
|
|
||||
LL | type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/wrong-number-of-args.rs:159:15
|
||||
|
|
||||
LL | trait GenericLifetimeAT<'a> {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:185:26
|
||||
@ -577,29 +622,35 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
|
||||
--> $DIR/wrong-number-of-args.rs:189:26
|
||||
|
|
||||
LL | type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/wrong-number-of-args.rs:181:15
|
||||
|
|
||||
LL | trait GenericTypeAT<A> {
|
||||
| ^^^^^^^^^^^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:193:26
|
||||
|
|
||||
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^--------------------- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^^^^^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 0 lifetime parameters
|
||||
--> $DIR/wrong-number-of-args.rs:181:15
|
||||
|
|
||||
LL | trait GenericTypeAT<A> {
|
||||
| ^^^^^^^^^^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/wrong-number-of-args.rs:193:26
|
||||
@ -653,15 +704,18 @@ error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supp
|
||||
--> $DIR/wrong-number-of-args.rs:216:26
|
||||
|
|
||||
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: trait defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:216:26
|
||||
@ -683,71 +737,86 @@ error[E0107]: trait takes 1 generic argument but 2 generic arguments were suppli
|
||||
--> $DIR/wrong-number-of-args.rs:227:26
|
||||
|
|
||||
LL | type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:234:26
|
||||
|
|
||||
LL | type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: trait defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:238:26
|
||||
|
|
||||
LL | type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:242:26
|
||||
|
|
||||
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: trait defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:242:26
|
||||
|
|
||||
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: trait defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/wrong-number-of-args.rs:201:15
|
||||
|
|
||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:254:26
|
||||
@ -787,15 +856,18 @@ error[E0107]: trait takes 2 generic arguments but 3 generic arguments were suppl
|
||||
--> $DIR/wrong-number-of-args.rs:262:26
|
||||
|
|
||||
LL | type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
|
||||
| ^^^^^^^^^^^^^^^^^ -- help: remove this generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
| ^^^^^^^^^^^^^^^^^ expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/wrong-number-of-args.rs:250:15
|
||||
|
|
||||
LL | trait GenericTypeTypeAT<A, B> {
|
||||
| ^^^^^^^^^^^^^^^^^ - -
|
||||
help: remove this 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
|
||||
--> $DIR/wrong-number-of-args.rs:277:26
|
||||
@ -911,9 +983,13 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
|
||||
--> $DIR/wrong-number-of-args.rs:318:18
|
||||
|
|
||||
LL | type C = HashMap<'static>;
|
||||
| ^^^^^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
LL - type C = HashMap<'static>;
|
||||
LL + type C = HashMap;
|
||||
|
|
||||
|
||||
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
||||
--> $DIR/wrong-number-of-args.rs:318:18
|
||||
@ -930,9 +1006,13 @@ error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments w
|
||||
--> $DIR/wrong-number-of-args.rs:324:18
|
||||
|
|
||||
LL | type D = HashMap<usize, String, char, f64>;
|
||||
| ^^^^^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected at most 3 generic arguments
|
||||
| ^^^^^^^ expected at most 3 generic arguments
|
||||
|
|
||||
help: remove this generic argument
|
||||
|
|
||||
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
|
||||
--> $DIR/wrong-number-of-args.rs:328:18
|
||||
@ -973,9 +1053,13 @@ error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was suppli
|
||||
--> $DIR/wrong-number-of-args.rs:342:18
|
||||
|
|
||||
LL | type C = Result<'static>;
|
||||
| ^^^^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
LL - type C = Result<'static>;
|
||||
LL + type C = Result;
|
||||
|
|
||||
|
||||
error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
|
||||
--> $DIR/wrong-number-of-args.rs:342:18
|
||||
@ -992,9 +1076,13 @@ error[E0107]: enum takes 2 generic arguments but 3 generic arguments were suppli
|
||||
--> $DIR/wrong-number-of-args.rs:348:18
|
||||
|
|
||||
LL | type D = Result<usize, String, char>;
|
||||
| ^^^^^^ ---- help: remove this generic argument
|
||||
| |
|
||||
| expected 2 generic arguments
|
||||
| ^^^^^^ expected 2 generic arguments
|
||||
|
|
||||
help: remove this generic argument
|
||||
|
|
||||
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
|
||||
--> $DIR/wrong-number-of-args.rs:352:18
|
||||
|
@ -2,9 +2,7 @@ error[E0107]: function takes 1 generic argument but 2 generic arguments were sup
|
||||
--> $DIR/explicit-generic-args-for-impl.rs:4:5
|
||||
|
|
||||
LL | foo::<str, String>("".to_string());
|
||||
| ^^^ ------ help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: function defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/explicit-generic-args-for-impl.rs:1:4
|
||||
@ -12,6 +10,11 @@ note: function defined here, with 1 generic parameter: `T`
|
||||
LL | fn foo<T: ?Sized>(_f: impl AsRef<T>) {}
|
||||
| ^^^ -
|
||||
= note: `impl Trait` cannot be explicitly specified as a generic argument
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - foo::<str, String>("".to_string());
|
||||
LL + foo::<str, >("".to_string());
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -38,29 +38,35 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:4:17
|
||||
|
|
||||
LL | fn bar() -> Wrapper<impl Sized>;
|
||||
| ^^^^^^^ ---------- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
||||
|
|
||||
LL | struct Wrapper<'rom>(&'rom ());
|
||||
| ^^^^^^^
|
||||
help: remove this 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
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:18:17
|
||||
|
|
||||
LL | fn foo() -> Wrapper<impl Sized>;
|
||||
| ^^^^^^^ ---------- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
||||
|
|
||||
LL | struct Wrapper<'rom>(&'rom ());
|
||||
| ^^^^^^^
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - fn foo() -> Wrapper<impl Sized>;
|
||||
LL + fn foo() -> Wrapper<>;
|
||||
|
|
||||
|
||||
error[E0053]: method `bar` has an incompatible return type for trait
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:10:17
|
||||
@ -93,15 +99,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:24:17
|
||||
|
|
||||
LL | fn foo() -> Wrapper<impl Sized> {
|
||||
| ^^^^^^^ ---------- help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/opaque-and-lifetime-mismatch.rs:1:8
|
||||
|
|
||||
LL | struct Wrapper<'rom>(&'rom ());
|
||||
| ^^^^^^^
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - fn foo() -> Wrapper<impl Sized> {
|
||||
LL + fn foo() -> Wrapper<> {
|
||||
|
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
@ -2,9 +2,13 @@ error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supp
|
||||
--> $DIR/issue-18423.rs:4:8
|
||||
|
|
||||
LL | x: Box<'a, isize>
|
||||
| ^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^ expected 0 lifetime arguments
|
||||
|
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - x: Box<'a, isize>
|
||||
LL + x: Box<, isize>
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -2,9 +2,7 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
|
||||
--> $DIR/issue-53251.rs:11:20
|
||||
|
|
||||
LL | S::f::<i64>();
|
||||
| ^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
...
|
||||
LL | impl_add!(a b);
|
||||
| -------------- in this macro invocation
|
||||
@ -15,14 +13,17 @@ note: associated function defined here, with 0 generic parameters
|
||||
LL | fn f() {}
|
||||
| ^
|
||||
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: remove these generics
|
||||
|
|
||||
LL - S::f::<i64>();
|
||||
LL + S::f();
|
||||
|
|
||||
|
||||
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/issue-53251.rs:11:20
|
||||
|
|
||||
LL | S::f::<i64>();
|
||||
| ^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
...
|
||||
LL | impl_add!(a b);
|
||||
| -------------- in this macro invocation
|
||||
@ -34,6 +35,11 @@ LL | fn f() {}
|
||||
| ^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: remove these generics
|
||||
|
|
||||
LL - S::f::<i64>();
|
||||
LL + S::f();
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -20,15 +20,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/issue-60622.rs:10:7
|
||||
|
|
||||
LL | b.a::<'_, T>();
|
||||
| ^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: method defined here, with 0 generic parameters
|
||||
--> $DIR/issue-60622.rs:6:8
|
||||
|
|
||||
LL | fn a(&self) {}
|
||||
| ^
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - b.a::<'_, T>();
|
||||
LL + b.a::<'_, >();
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were
|
||||
--> $DIR/mismatched_arg_count.rs:9:29
|
||||
|
|
||||
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
||||
| ^^^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: type alias defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/mismatched_arg_count.rs:7:6
|
||||
|
|
||||
LL | type Alias<'a, T> = <T as Trait<'a>>::Assoc;
|
||||
| ^^^^^ --
|
||||
help: remove this 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
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were su
|
||||
--> $DIR/noisy-follow-up-erro.rs:12:30
|
||||
|
|
||||
LL | fn boom(&self, foo: &mut Foo<'_, '_, 'a>) -> Result<(), &'a ()> {
|
||||
| ^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 2 lifetime arguments
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 2 lifetime parameters: `'c`, `'d`
|
||||
--> $DIR/noisy-follow-up-erro.rs:1:8
|
||||
|
|
||||
LL | struct Foo<'c, 'd>(&'c (), &'d ());
|
||||
| ^^^ -- --
|
||||
help: remove this 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`
|
||||
--> $DIR/noisy-follow-up-erro.rs:14:9
|
||||
|
@ -20,15 +20,18 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
|
||||
--> $DIR/method-call-lifetime-args-fail.rs:18:7
|
||||
|
|
||||
LL | S.early::<'static, 'static, 'static>();
|
||||
| ^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 2 lifetime arguments
|
||||
| ^^^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
||||
|
|
||||
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
|
||||
| ^^^^^ -- --
|
||||
help: remove this 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
|
||||
--> $DIR/method-call-lifetime-args-fail.rs:27:15
|
||||
@ -220,15 +223,18 @@ error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were su
|
||||
--> $DIR/method-call-lifetime-args-fail.rs:65:8
|
||||
|
|
||||
LL | S::early::<'static, 'static, 'static>(S);
|
||||
| ^^^^^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 2 lifetime arguments
|
||||
| ^^^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
||||
|
|
||||
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
|
||||
| ^^^^^ -- --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - S::early::<'static, 'static, 'static>(S);
|
||||
LL + S::early::<'static, 'static, >(S);
|
||||
|
|
||||
|
||||
error: aborting due to 18 previous errors
|
||||
|
||||
|
@ -12,15 +12,18 @@ error[E0107]: struct takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/issue-3214.rs:6:22
|
||||
|
|
||||
LL | impl<T> Drop for Foo<T> {
|
||||
| ^^^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: struct defined here, with 0 generic parameters
|
||||
--> $DIR/issue-3214.rs:2:12
|
||||
|
|
||||
LL | struct Foo {
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - impl<T> Drop for Foo<T> {
|
||||
LL + impl<T> Drop for Foo {
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
|
||||
--> $DIR/no-explicit-const-params-cross-crate.rs:14:5
|
||||
|
|
||||
LL | foo::<false>();
|
||||
| ^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/auxiliary/cross-crate.rs:5:14
|
||||
|
|
||||
LL | pub const fn foo() {}
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<false>();
|
||||
LL + foo();
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/no-explicit-const-params-cross-crate.rs:16:12
|
||||
@ -32,15 +35,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
|
||||
--> $DIR/no-explicit-const-params-cross-crate.rs:7:5
|
||||
|
|
||||
LL | foo::<true>();
|
||||
| ^^^-------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/auxiliary/cross-crate.rs:5:14
|
||||
|
|
||||
LL | pub const fn foo() {}
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<true>();
|
||||
LL + foo();
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/no-explicit-const-params-cross-crate.rs:9:12
|
||||
|
@ -16,15 +16,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
|
||||
--> $DIR/no-explicit-const-params.rs:22:5
|
||||
|
|
||||
LL | foo::<false>();
|
||||
| ^^^--------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/no-explicit-const-params.rs:3:10
|
||||
|
|
||||
LL | const fn foo() {}
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<false>();
|
||||
LL + foo();
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/no-explicit-const-params.rs:24:12
|
||||
@ -55,15 +58,18 @@ error[E0107]: function takes 0 generic arguments but 1 generic argument was supp
|
||||
--> $DIR/no-explicit-const-params.rs:15:5
|
||||
|
|
||||
LL | foo::<true>();
|
||||
| ^^^-------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/no-explicit-const-params.rs:3:10
|
||||
|
|
||||
LL | const fn foo() {}
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<true>();
|
||||
LL + foo();
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/no-explicit-const-params.rs:17:12
|
||||
|
@ -2,29 +2,35 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
|
||||
--> $DIR/seq-args.rs:4:13
|
||||
|
|
||||
LL | impl<T> Seq<T> for Vec<T> {
|
||||
| ^^^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/seq-args.rs:2:11
|
||||
|
|
||||
LL | trait Seq { }
|
||||
| ^^^
|
||||
help: remove these 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
|
||||
--> $DIR/seq-args.rs:9:10
|
||||
|
|
||||
LL | impl Seq<bool> for u32 {
|
||||
| ^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/seq-args.rs:2:11
|
||||
|
|
||||
LL | trait Seq { }
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - impl Seq<bool> for u32 {
|
||||
LL + impl Seq for u32 {
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -8,15 +8,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/struct-path-associated-type.rs:14:16
|
||||
|
|
||||
LL | let z = T::A::<u8> {};
|
||||
| ^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/struct-path-associated-type.rs:4:10
|
||||
|
|
||||
LL | type A;
|
||||
| ^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - let z = T::A::<u8> {};
|
||||
LL + let z = T::A {};
|
||||
|
|
||||
|
||||
error[E0071]: expected struct, variant or union type, found associated type
|
||||
--> $DIR/struct-path-associated-type.rs:14:13
|
||||
@ -34,15 +37,18 @@ error[E0107]: associated type takes 0 generic arguments but 1 generic argument w
|
||||
--> $DIR/struct-path-associated-type.rs:25:16
|
||||
|
|
||||
LL | let z = T::A::<u8> {};
|
||||
| ^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/struct-path-associated-type.rs:4:10
|
||||
|
|
||||
LL | type A;
|
||||
| ^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - let z = T::A::<u8> {};
|
||||
LL + let z = T::A {};
|
||||
|
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/struct-path-associated-type.rs:32:13
|
||||
|
@ -68,15 +68,18 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:48:15
|
||||
|
|
||||
LL | let pt3 = PointF::<i32> {
|
||||
| ^^^^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:6:6
|
||||
|
|
||||
LL | type PointF = Point<f32>;
|
||||
| ^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - let pt3 = PointF::<i32> {
|
||||
LL + let pt3 = PointF {
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:49:12
|
||||
@ -104,15 +107,18 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
||||
|
|
||||
LL | PointF::<u32> { .. } => {}
|
||||
| ^^^^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:6:6
|
||||
|
|
||||
LL | type PointF = Point<f32>;
|
||||
| ^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - PointF::<u32> { .. } => {}
|
||||
LL + PointF { .. } => {}
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/issue-101421.rs:10:8
|
||||
|
|
||||
LL | ().f::<()>(());
|
||||
| ^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^ expected 0 generic arguments
|
||||
|
|
||||
note: method defined here, with 0 generic parameters
|
||||
--> $DIR/issue-101421.rs:2:8
|
||||
|
|
||||
LL | fn f(&self, _: ());
|
||||
| ^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - ().f::<()>(());
|
||||
LL + ().f(());
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/issue-104287.rs:10:5
|
||||
|
|
||||
LL | foo::<()>(x);
|
||||
| ^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: method defined here, with 0 generic parameters
|
||||
--> $DIR/issue-104287.rs:6:8
|
||||
|
|
||||
LL | fn foo(&self) {}
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - foo::<()>(x);
|
||||
LL + foo(x);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `foo` in this scope
|
||||
--> $DIR/issue-104287.rs:10:5
|
||||
|
@ -46,15 +46,18 @@ error[E0107]: associated function takes 0 generic arguments but 1 generic argume
|
||||
--> $DIR/issue-89064.rs:27:21
|
||||
|
|
||||
LL | let _ = A::<S>::foo::<S>();
|
||||
| ^^^----- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: associated function defined here, with 0 generic parameters
|
||||
--> $DIR/issue-89064.rs:4:8
|
||||
|
|
||||
LL | fn foo() {}
|
||||
| ^^^
|
||||
help: remove these 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
|
||||
--> $DIR/issue-89064.rs:31:16
|
||||
|
@ -117,15 +117,18 @@ 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
|
||||
|
|
||||
LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
|
||||
| ^^^^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: struct defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:26:8
|
||||
|
|
||||
LL | struct Struct<T: Trait<u32, String>> {
|
||||
| ^^^^^^ -
|
||||
help: remove this 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
|
||||
|
||||
|
@ -8,15 +8,18 @@ error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were sup
|
||||
--> $DIR/vs-lifetime.rs:11:12
|
||||
|
|
||||
LL | let _: S<'static, 'static>;
|
||||
| ^ ------- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 1 lifetime argument
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: struct defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/vs-lifetime.rs:4:8
|
||||
|
|
||||
LL | struct S<'a, T>(&'a u8, T);
|
||||
| ^ --
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
LL - let _: S<'static, 'static>;
|
||||
LL + let _: S<'static, >;
|
||||
|
|
||||
|
||||
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
|
||||
--> $DIR/vs-lifetime.rs:11:12
|
||||
|
@ -2,29 +2,35 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/test-2.rs:9:8
|
||||
|
|
||||
LL | 10.dup::<i32>();
|
||||
| ^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: method defined here, with 0 generic parameters
|
||||
--> $DIR/test-2.rs:4:16
|
||||
|
|
||||
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
|
||||
| ^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - 10.dup::<i32>();
|
||||
LL + 10.dup();
|
||||
|
|
||||
|
||||
error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied
|
||||
--> $DIR/test-2.rs:11:8
|
||||
|
|
||||
LL | 10.blah::<i32, i32>();
|
||||
| ^^^^ --- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^^ expected 1 generic argument
|
||||
|
|
||||
note: method defined here, with 1 generic parameter: `X`
|
||||
--> $DIR/test-2.rs:4:39
|
||||
|
|
||||
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
|
||||
| ^^^^ -
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - 10.blah::<i32, i32>();
|
||||
LL + 10.blah::<i32, >();
|
||||
|
|
||||
|
||||
error[E0038]: the trait `bar` cannot be made into an object
|
||||
--> $DIR/test-2.rs:13:22
|
||||
|
@ -1,13 +1,16 @@
|
||||
error[E0107]: trait takes at most 2 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/issue-101739-2.rs:17:14
|
||||
|
|
||||
LL | Dst: BikeshedIntrinsicFrom<
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
|
||||
...
|
||||
LL | / ASSUME_LIFETIMES,
|
||||
LL | | ASSUME_VALIDITY,
|
||||
LL | | ASSUME_VISIBILITY,
|
||||
| |_____________________________- help: remove these generic arguments
|
||||
LL | Dst: BikeshedIntrinsicFrom<
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ expected at most 2 generic arguments
|
||||
|
|
||||
help: remove these generic arguments
|
||||
|
|
||||
LL - ASSUME_LIFETIMES,
|
||||
LL - ASSUME_VALIDITY,
|
||||
LL - ASSUME_VISIBILITY,
|
||||
LL + ,
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -308,29 +308,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
|
||||
--> $DIR/enum-variant-generic-args.rs:64:5
|
||||
|
|
||||
LL | AliasFixed::<()>::TSVariant(());
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::TSVariant(());
|
||||
LL + AliasFixed::TSVariant(());
|
||||
|
|
||||
|
||||
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/enum-variant-generic-args.rs:66:5
|
||||
|
|
||||
LL | AliasFixed::<()>::TSVariant::<()>(());
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::TSVariant::<()>(());
|
||||
LL + AliasFixed::TSVariant::<()>(());
|
||||
|
|
||||
|
||||
error[E0109]: type arguments are not allowed on this type
|
||||
--> $DIR/enum-variant-generic-args.rs:66:35
|
||||
@ -399,29 +405,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
|
||||
--> $DIR/enum-variant-generic-args.rs:82:5
|
||||
|
|
||||
LL | AliasFixed::<()>::SVariant { v: () };
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::SVariant { v: () };
|
||||
LL + AliasFixed::SVariant { v: () };
|
||||
|
|
||||
|
||||
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/enum-variant-generic-args.rs:84:5
|
||||
|
|
||||
LL | AliasFixed::<()>::SVariant::<()> { v: () };
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::SVariant::<()> { v: () };
|
||||
LL + AliasFixed::SVariant::<()> { v: () };
|
||||
|
|
||||
|
||||
error[E0109]: type arguments are not allowed on this type
|
||||
--> $DIR/enum-variant-generic-args.rs:84:34
|
||||
@ -474,29 +486,35 @@ error[E0107]: type alias takes 0 generic arguments but 1 generic argument was su
|
||||
--> $DIR/enum-variant-generic-args.rs:100:5
|
||||
|
|
||||
LL | AliasFixed::<()>::UVariant;
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::UVariant;
|
||||
LL + AliasFixed::UVariant;
|
||||
|
|
||||
|
||||
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/enum-variant-generic-args.rs:102:5
|
||||
|
|
||||
LL | AliasFixed::<()>::UVariant::<()>;
|
||||
| ^^^^^^^^^^------ help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: type alias defined here, with 0 generic parameters
|
||||
--> $DIR/enum-variant-generic-args.rs:9:6
|
||||
|
|
||||
LL | type AliasFixed = Enum<()>;
|
||||
| ^^^^^^^^^^
|
||||
help: remove these generics
|
||||
|
|
||||
LL - AliasFixed::<()>::UVariant::<()>;
|
||||
LL + AliasFixed::UVariant::<()>;
|
||||
|
|
||||
|
||||
error[E0109]: type arguments are not allowed on this type
|
||||
--> $DIR/enum-variant-generic-args.rs:102:34
|
||||
|
@ -2,69 +2,99 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:1:11
|
||||
|
|
||||
LL | fn foo1<T:Copy<U>, U>(x: T) {}
|
||||
| ^^^^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
|
||||
|
|
||||
LL | trait Trait: Copy<dyn Send> {}
|
||||
| ^^^^---------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
LL - trait Trait: Copy<dyn Send> {}
|
||||
LL + trait Trait: Copy {}
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
|
||||
|
|
||||
LL | trait Trait: Copy<dyn Send> {}
|
||||
| ^^^^---------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
LL - trait Trait: Copy<dyn Send> {}
|
||||
LL + trait Trait: Copy {}
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
|
||||
|
|
||||
LL | trait Trait: Copy<dyn Send> {}
|
||||
| ^^^^---------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: remove these generics
|
||||
|
|
||||
LL - trait Trait: Copy<dyn Send> {}
|
||||
LL + trait Trait: Copy {}
|
||||
|
|
||||
|
||||
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:9:21
|
||||
|
|
||||
LL | struct MyStruct1<T: Copy<T>>(T);
|
||||
| ^^^^--- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:12:25
|
||||
|
|
||||
LL | struct MyStruct2<'a, T: Copy<'a>>(&'a T);
|
||||
| ^^^^---- help: remove these generics
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
help: remove these generics
|
||||
|
|
||||
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
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
|
||||
|
|
||||
LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
|
||||
| ^^^^ -- help: remove this lifetime argument
|
||||
| |
|
||||
| expected 0 lifetime arguments
|
||||
| ^^^^ expected 0 lifetime arguments
|
||||
|
|
||||
help: remove this lifetime argument
|
||||
|
|
||||
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
|
||||
--> $DIR/typeck-builtin-bound-type-parameters.rs:15:15
|
||||
|
|
||||
LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
|
||||
| ^^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
help: remove this generic argument
|
||||
|
|
||||
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
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
|
||||
--> $DIR/typeck_type_placeholder_lifetime_1.rs:9:12
|
||||
|
|
||||
LL | let c: Foo<_, _> = Foo { r: &5 };
|
||||
| ^^^ - help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: struct defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/typeck_type_placeholder_lifetime_1.rs:4:8
|
||||
|
|
||||
LL | struct Foo<'a, T:'a> {
|
||||
| ^^^ -
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - let c: Foo<_, _> = Foo { r: &5 };
|
||||
LL + let c: Foo<_, > = Foo { r: &5 };
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: struct takes 1 generic argument but 2 generic arguments were suppl
|
||||
--> $DIR/typeck_type_placeholder_lifetime_2.rs:9:12
|
||||
|
|
||||
LL | let c: Foo<_, usize> = Foo { r: &5 };
|
||||
| ^^^ ----- help: remove this generic argument
|
||||
| |
|
||||
| expected 1 generic argument
|
||||
| ^^^ expected 1 generic argument
|
||||
|
|
||||
note: struct defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/typeck_type_placeholder_lifetime_2.rs:4:8
|
||||
|
|
||||
LL | struct Foo<'a, T:'a> {
|
||||
| ^^^ -
|
||||
help: remove this generic argument
|
||||
|
|
||||
LL - let c: Foo<_, usize> = Foo { r: &5 };
|
||||
LL + let c: Foo<_, > = Foo { r: &5 };
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -34,15 +34,18 @@ error[E0107]: method takes 0 generic arguments but 1 generic argument was suppli
|
||||
--> $DIR/ufcs-qpath-missing-params.rs:17:26
|
||||
|
|
||||
LL | <String as IntoCow>::into_cow::<str>("foo".to_string());
|
||||
| ^^^^^^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: method defined here, with 0 generic parameters
|
||||
--> $DIR/ufcs-qpath-missing-params.rs:4:8
|
||||
|
|
||||
LL | fn into_cow(self) -> Cow<'a, B>;
|
||||
| ^^^^^^^^
|
||||
help: remove these 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
|
||||
|
||||
|
@ -2,15 +2,18 @@ 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
|
||||
|
|
||||
LL | fn foo1(_: &dyn Zero()) {
|
||||
| ^^^^-- help: remove these parenthetical generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
|
||||
|
|
||||
LL | trait Zero { fn dummy(&self); }
|
||||
| ^^^^
|
||||
help: remove these parenthetical generics
|
||||
|
|
||||
LL - fn foo1(_: &dyn Zero()) {
|
||||
LL + fn foo1(_: &dyn Zero) {
|
||||
|
|
||||
|
||||
error[E0220]: associated type `Output` not found for `Zero`
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:17
|
||||
@ -22,43 +25,52 @@ 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
|
||||
|
|
||||
LL | fn foo2(_: &dyn Zero<usize>) {
|
||||
| ^^^^------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
|
||||
|
|
||||
LL | trait Zero { fn dummy(&self); }
|
||||
| ^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:14:17
|
||||
|
|
||||
LL | fn foo3(_: &dyn Zero < usize >) {
|
||||
| ^^^^-------------- help: remove these generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
|
||||
|
|
||||
LL | trait Zero { fn dummy(&self); }
|
||||
| ^^^^
|
||||
help: remove these 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
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
|
||||
|
|
||||
LL | fn foo4(_: &dyn Zero(usize)) {
|
||||
| ^^^^------- help: remove these parenthetical generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
|
||||
|
|
||||
LL | trait Zero { fn dummy(&self); }
|
||||
| ^^^^
|
||||
help: remove these parenthetical generics
|
||||
|
|
||||
LL - fn foo4(_: &dyn Zero(usize)) {
|
||||
LL + fn foo4(_: &dyn Zero) {
|
||||
|
|
||||
|
||||
error[E0220]: associated type `Output` not found for `Zero`
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:18:17
|
||||
@ -70,15 +82,18 @@ 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
|
||||
|
|
||||
LL | fn foo5(_: &dyn Zero ( usize )) {
|
||||
| ^^^^-------------- help: remove these parenthetical generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:3:7
|
||||
|
|
||||
LL | trait Zero { fn dummy(&self); }
|
||||
| ^^^^
|
||||
help: remove these parenthetical generics
|
||||
|
|
||||
LL - fn foo5(_: &dyn Zero ( usize )) {
|
||||
LL + fn foo5(_: &dyn Zero) {
|
||||
|
|
||||
|
||||
error[E0220]: associated type `Output` not found for `Zero`
|
||||
--> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:23:17
|
||||
|
@ -2,15 +2,18 @@ error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplie
|
||||
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8
|
||||
|
|
||||
LL | fn f<F:Trait(isize) -> isize>(x: F) {}
|
||||
| ^^^^^------- help: remove these parenthetical generics
|
||||
| |
|
||||
| expected 0 generic arguments
|
||||
| ^^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: trait defined here, with 0 generic parameters
|
||||
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:3:7
|
||||
|
|
||||
LL | trait Trait {}
|
||||
| ^^^^^
|
||||
help: remove these 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`
|
||||
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24
|
||||
|
Loading…
Reference in New Issue
Block a user