1
Fork 0

Rollup merge of #90708 - NieDzejkob:feature-note, r=jackh726

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

Fixes #90615
This commit is contained in:
Yuki Okushi 2021-11-09 22:02:25 +09:00 committed by GitHub
commit f1fef6be7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}