about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
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
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')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs19
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs3
2 files changed, 1 insertions, 21 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![];
 
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index fee2e7636ea..0077dec889d 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -52,7 +52,7 @@ use rustc_hir::def::{DefKind, Namespace, PartialRes, PerNS, Res};
 use rustc_hir::def_id::{DefId, DefPathHash, LocalDefId, CRATE_DEF_ID};
 use rustc_hir::definitions::{DefKey, DefPathData, Definitions};
 use rustc_hir::intravisit;
-use rustc_hir::{ConstArg, GenericArg, InferKind, ParamName};
+use rustc_hir::{ConstArg, GenericArg, ParamName};
 use rustc_index::vec::{Idx, IndexVec};
 use rustc_query_system::ich::StableHashingContext;
 use rustc_session::lint::builtin::BARE_TRAIT_OBJECTS;
@@ -1113,7 +1113,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
                         return GenericArg::Infer(hir::InferArg {
                             hir_id: self.lower_node_id(ty.id),
                             span: self.lower_span(ty.span),
-                            kind: InferKind::Type,
                         });
                     }
                     // We parse const arguments as path types as we cannot distinguish them during