Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message
This commit is contained in:
parent
3e3890c9d4
commit
048e1c942d
@ -672,6 +672,17 @@ pub(crate) fn check_impl_trait(
|
||||
err.span_label(span, "explicit generic argument not allowed");
|
||||
}
|
||||
|
||||
err.note(
|
||||
"see issue #83701 <https://github.com/rust-lang/rust/issues/83701> \
|
||||
for more information",
|
||||
);
|
||||
if tcx.sess.is_nightly_build() {
|
||||
err.help(
|
||||
"add `#![feature(explicit_generic_args_with_impl_trait)]` \
|
||||
to the crate attributes to enable",
|
||||
);
|
||||
}
|
||||
|
||||
err.emit();
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
|
||||
|
|
||||
LL | assert_eq!(f::<4usize>(Usizable), 20usize);
|
||||
| ^^^^^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
|
||||
|
|
||||
LL | foo::<str>("".to_string());
|
||||
| ^^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
|
||||
|
|
||||
LL | foo::<String>('a');
|
||||
| ^^^^^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -5,6 +5,9 @@ LL | evt.handle_event::<TestEvent, fn(TestEvent)>(|_evt| {
|
||||
| ^^^^^^^^^ ^^^^^^^^^^^^^ explicit generic argument not allowed
|
||||
| |
|
||||
| explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,18 +3,27 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
|
||||
|
|
||||
LL | func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
|
||||
--> $DIR/synthetic-param.rs:23:17
|
||||
|
|
||||
LL | Foo::func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
|
||||
--> $DIR/synthetic-param.rs:26:23
|
||||
|
|
||||
LL | Bar::<i8>::func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user