diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-15 08:36:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-15 08:36:19 +0100 |
| commit | d258e92900739e7798ed4fccfbbb8cb0fe519acd (patch) | |
| tree | 455360166467e151049f5a323a0a1520f383a10d /compiler/rustc_ast_lowering/src/expr.rs | |
| parent | 195e931b02b69bbce1bcf4632f4e2d5603ef006b (diff) | |
| parent | d95f749f14a84006273930e155a76259c22660c5 (diff) | |
| download | rust-d258e92900739e7798ed4fccfbbb8cb0fe519acd.tar.gz rust-d258e92900739e7798ed4fccfbbb8cb0fe519acd.zip | |
Rollup merge of #90521 - jhpratt:stabilize-destructuring_assignment, r=jackh726,pnkfelix
Stabilize `destructuring_assignment` Closes #71126 - [Stabilization report](https://github.com/rust-lang/rust/issues/71126#issuecomment-941148058) - [Completed FCP](https://github.com/rust-lang/rust/issues/71126#issuecomment-954914819) `@rustbot` label +F-destructuring-assignment +T-lang Also needs +relnotes but I don't have permission to add that tag.
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 19 |
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![]; |
