1
Fork 0

Remove impl_trait_in_bindings feature flag

This commit is contained in:
Santiago Pastorino 2021-07-16 10:06:26 -03:00
parent 75585b408f
commit e8c04b4386
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
63 changed files with 388 additions and 741 deletions

View file

@ -1460,7 +1460,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}),
))
}
ImplTraitContext::Disallowed(pos) => {
ImplTraitContext::Disallowed(_) => {
let mut err = struct_span_err!(
self.sess,
t.span,
@ -1468,12 +1468,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
"`impl Trait` not allowed outside of {}",
"function and inherent method return types",
);
if pos == ImplTraitPosition::Binding && self.sess.is_nightly_build() {
err.help(
"add `#![feature(impl_trait_in_bindings)]` to the crate \
attributes to enable",
);
}
err.emit();
hir::TyKind::Err
}