Skip to content

Commit 3ee016a

Browse files
committedDec 15, 2021
Auto merge of rust-lang#91959 - matthiaskrgr:rollup-rhajuvw, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#90521 (Stabilize `destructuring_assignment`) - rust-lang#91479 (Add `[T]::as_simd(_mut)`) - rust-lang#91584 (Improve code for rustdoc-gui tester) - rust-lang#91886 (core: minor `Option` doc correction) - rust-lang#91888 (Handle unordered const/ty generics for object lifetime defaults) - rust-lang#91905 (Fix source code page sidebar on mobile) - rust-lang#91906 (Removed `in_band_lifetimes` from `library\proc_macro`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents df89fd2 + 6c6cfa8 commit 3ee016a

File tree

63 files changed

+272
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+272
-424
lines changed
 

‎compiler/rustc_ast_lowering/src/expr.rs

-19
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use rustc_errors::struct_span_err;
99
use rustc_hir as hir;
1010
use rustc_hir::def::Res;
1111
use rustc_hir::definitions::DefPathData;
12-
use rustc_session::parse::feature_err;
1312
use rustc_span::hygiene::ExpnId;
1413
use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
1514
use rustc_span::symbol::{sym, Ident, Symbol};
@@ -962,24 +961,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
962961
self.lower_span(eq_sign_span),
963962
);
964963
}
965-
if !self.sess.features_untracked().destructuring_assignment {
966-
let mut err = feature_err(
967-
&self.sess.parse_sess,
968-
sym::destructuring_assignment,
969-
eq_sign_span,
970-
"destructuring assignments are unstable",
971-
);
972-
err.span_label(lhs.span, "cannot assign to this expression");
973-
if self.is_in_loop_condition {
974-
err.span_suggestion_verbose(
975-
lhs.span.shrink_to_lo(),
976-
"you might have meant to use pattern destructuring",
977-
"let ".to_string(),
978-
rustc_errors::Applicability::MachineApplicable,
979-
);
980-
}
981-
err.emit();
982-
}
983964

984965
let mut assignments = vec![];
985966

‎compiler/rustc_ast_lowering/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use rustc_hir::def::{DefKind, Namespace, PartialRes, PerNS, Res};
5252
use rustc_hir::def_id::{DefId, DefPathHash, LocalDefId, CRATE_DEF_ID};
5353
use rustc_hir::definitions::{DefKey, DefPathData, Definitions};
5454
use rustc_hir::intravisit;
55-
use rustc_hir::{ConstArg, GenericArg, InferKind, ParamName};
55+
use rustc_hir::{ConstArg, GenericArg, ParamName};
5656
use rustc_index::vec::{Idx, IndexVec};
5757
use rustc_query_system::ich::StableHashingContext;
5858
use rustc_session::lint::builtin::BARE_TRAIT_OBJECTS;
@@ -1113,7 +1113,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11131113
return GenericArg::Infer(hir::InferArg {
11141114
hir_id: self.lower_node_id(ty.id),
11151115
span: self.lower_span(ty.span),
1116-
kind: InferKind::Type,
11171116
});
11181117
}
11191118
// We parse const arguments as path types as we cannot distinguish them during

0 commit comments

Comments
 (0)
Please sign in to comment.