Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit bc106eb

Browse files
committed
Remove impl traits bindings error message handling on AST lowering
1 parent ac3a43b commit bc106eb

File tree

1 file changed

+1
-6
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+1
-6
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,17 +1465,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14651465
))
14661466
}
14671467
ImplTraitContext::Disallowed(pos) => {
1468-
let allowed_in = if self.sess.features_untracked().impl_trait_in_bindings {
1469-
"bindings or function and inherent method return types"
1470-
} else {
1471-
"function and inherent method return types"
1472-
};
14731468
let mut err = struct_span_err!(
14741469
self.sess,
14751470
t.span,
14761471
E0562,
14771472
"`impl Trait` not allowed outside of {}",
1478-
allowed_in,
1473+
"function and inherent method return types",
14791474
);
14801475
if pos == ImplTraitPosition::Binding && self.sess.is_nightly_build() {
14811476
err.help(

0 commit comments

Comments
 (0)