about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-15 09:31:59 +0000
committerbors <bors@rust-lang.org>2021-12-15 09:31:59 +0000
commit3ee016ae4d4c6ee4a34faa2eb7fdae2ffa7c9b46 (patch)
treefeda053596eb3645cbba8cb313676bdcd7024fee /compiler/rustc_ast_lowering/src/expr.rs
parentdf89fd2063aaa060c72c81254db0b930ff379e9a (diff)
parent6c6cfa87c08a7bfb6b27bb01b9337aa3178716a5 (diff)
downloadrust-3ee016ae4d4c6ee4a34faa2eb7fdae2ffa7c9b46.tar.gz
rust-3ee016ae4d4c6ee4a34faa2eb7fdae2ffa7c9b46.zip
Auto merge of #91959 - matthiaskrgr:rollup-rhajuvw, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #90521 (Stabilize `destructuring_assignment`)
 - #91479 (Add `[T]::as_simd(_mut)`)
 - #91584 (Improve code for rustdoc-gui tester)
 - #91886 (core: minor `Option` doc correction)
 - #91888 (Handle unordered const/ty generics for object lifetime defaults)
 - #91905 (Fix source code page sidebar on mobile)
 - #91906 (Removed `in_band_lifetimes` from `library\proc_macro`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index 75a45a437e7..be67fe72127 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -9,7 +9,6 @@ use rustc_errors::struct_span_err;
 use rustc_hir as hir;
 use rustc_hir::def::Res;
 use rustc_hir::definitions::DefPathData;
-use rustc_session::parse::feature_err;
 use rustc_span::hygiene::ExpnId;
 use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
 use rustc_span::symbol::{sym, Ident, Symbol};
@@ -962,24 +961,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
                 self.lower_span(eq_sign_span),
             );
         }
-        if !self.sess.features_untracked().destructuring_assignment {
-            let mut err = feature_err(
-                &self.sess.parse_sess,
-                sym::destructuring_assignment,
-                eq_sign_span,
-                "destructuring assignments are unstable",
-            );
-            err.span_label(lhs.span, "cannot assign to this expression");
-            if self.is_in_loop_condition {
-                err.span_suggestion_verbose(
-                    lhs.span.shrink_to_lo(),
-                    "you might have meant to use pattern destructuring",
-                    "let ".to_string(),
-                    rustc_errors::Applicability::MachineApplicable,
-                );
-            }
-            err.emit();
-        }
 
         let mut assignments = vec![];