1
Fork 0

Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message

This commit is contained in:
Jakub Kądziołka 2021-11-08 18:39:22 +01:00
parent 3e3890c9d4
commit 048e1c942d
No known key found for this signature in database
GPG key ID: E315A75846131564
6 changed files with 32 additions and 0 deletions

View file

@ -672,6 +672,17 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
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();
}