about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2021-07-14 15:48:33 -0300
committerSantiago Pastorino <spastorino@gmail.com>2021-07-17 23:14:23 -0300
commitbc106ebb5a8f96f905a3d96606b052fbf41b8332 (patch)
tree71bcdec6d530bedd178762af695dd6874822386e
parentac3a43b3161ade83a9c5c21baf898bef921393ed (diff)
downloadrust-bc106ebb5a8f96f905a3d96606b052fbf41b8332.tar.gz
rust-bc106ebb5a8f96f905a3d96606b052fbf41b8332.zip
Remove impl traits bindings error message handling on AST lowering
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 21c9721e3c6..6ce03a9c564 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -1465,17 +1465,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                         ))
                     }
                     ImplTraitContext::Disallowed(pos) => {
-                        let allowed_in = if self.sess.features_untracked().impl_trait_in_bindings {
-                            "bindings or function and inherent method return types"
-                        } else {
-                            "function and inherent method return types"
-                        };
                         let mut err = struct_span_err!(
                             self.sess,
                             t.span,
                             E0562,
                             "`impl Trait` not allowed outside of {}",
-                            allowed_in,
+                            "function and inherent method return types",
                         );
                         if pos == ImplTraitPosition::Binding && self.sess.is_nightly_build() {
                             err.help(