Skip to content

Commit d96ce3e

Browse files
authored
Rollup merge of #91394 - Mark-Simulacrum:bump-stage0, r=pietroalbini
Bump stage0 compiler r? `@pietroalbini` (or anyone else)
2 parents 87ca333 + 971c549 commit d96ce3e

File tree

32 files changed

+456
-455
lines changed

32 files changed

+456
-455
lines changed

compiler/rustc_attr/src/builtin.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,10 @@ pub fn eval_condition(
519519
[NestedMetaItem::Literal(Lit { kind: LitKind::Str(sym, ..), span, .. })] => {
520520
(sym, span)
521521
}
522-
[NestedMetaItem::Literal(Lit { span, .. })
523-
| NestedMetaItem::MetaItem(MetaItem { span, .. })] => {
522+
[
523+
NestedMetaItem::Literal(Lit { span, .. })
524+
| NestedMetaItem::MetaItem(MetaItem { span, .. }),
525+
] => {
524526
sess.span_diagnostic
525527
.struct_span_err(*span, "expected a version literal")
526528
.emit();

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
977977
Some(ref name),
978978
BorrowExplanation::MustBeValidFor {
979979
category:
980-
category
981-
@
982-
(ConstraintCategory::Return(_)
980+
category @ (ConstraintCategory::Return(_)
983981
| ConstraintCategory::CallArgument
984982
| ConstraintCategory::OpaqueType),
985983
from_closure: false,

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

+21-10
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
165165
PlaceRef {
166166
local: _,
167167
projection:
168-
[.., ProjectionElem::Index(_)
169-
| ProjectionElem::ConstantIndex { .. }
170-
| ProjectionElem::Subslice { .. }
171-
| ProjectionElem::Downcast(..)],
168+
[
169+
..,
170+
ProjectionElem::Index(_)
171+
| ProjectionElem::ConstantIndex { .. }
172+
| ProjectionElem::Subslice { .. }
173+
| ProjectionElem::Downcast(..),
174+
],
172175
} => bug!("Unexpected immutable place."),
173176
}
174177

@@ -217,7 +220,12 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
217220
PlaceRef {
218221
local,
219222
projection:
220-
[proj_base @ .., ProjectionElem::Deref, ProjectionElem::Field(field, _), ProjectionElem::Deref],
223+
[
224+
proj_base @ ..,
225+
ProjectionElem::Deref,
226+
ProjectionElem::Field(field, _),
227+
ProjectionElem::Deref,
228+
],
221229
} => {
222230
err.span_label(span, format!("cannot {ACT}", ACT = act));
223231

@@ -763,11 +771,14 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
763771
kind:
764772
Call(
765773
_,
766-
[Expr {
767-
kind: MethodCall(path_segment, ..),
768-
hir_id,
769-
..
770-
}, ..],
774+
[
775+
Expr {
776+
kind: MethodCall(path_segment, ..),
777+
hir_id,
778+
..
779+
},
780+
..,
781+
],
771782
),
772783
..
773784
},

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+18-14
Original file line numberDiff line numberDiff line change
@@ -769,20 +769,24 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
769769
let opaque_ty = hir.item(id);
770770
if let hir::ItemKind::OpaqueTy(hir::OpaqueTy {
771771
bounds:
772-
[hir::GenericBound::LangItemTrait(
773-
hir::LangItem::Future,
774-
_,
775-
_,
776-
hir::GenericArgs {
777-
bindings:
778-
[hir::TypeBinding {
779-
ident: Ident { name: sym::Output, .. },
780-
kind: hir::TypeBindingKind::Equality { ty },
781-
..
782-
}],
783-
..
784-
},
785-
)],
772+
[
773+
hir::GenericBound::LangItemTrait(
774+
hir::LangItem::Future,
775+
_,
776+
_,
777+
hir::GenericArgs {
778+
bindings:
779+
[
780+
hir::TypeBinding {
781+
ident: Ident { name: sym::Output, .. },
782+
kind: hir::TypeBindingKind::Equality { ty },
783+
..
784+
},
785+
],
786+
..
787+
},
788+
),
789+
],
786790
..
787791
}) = opaque_ty.kind
788792
{

compiler/rustc_borrowck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(bool_to_option)]
44
#![feature(box_patterns)]
55
#![feature(crate_visibility_modifier)]
6-
#![cfg_attr(bootstrap, feature(format_args_capture))]
76
#![feature(in_band_lifetimes)]
87
#![feature(iter_zip)]
98
#![feature(let_else)]

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1525,14 +1525,12 @@ fn generator_layout_and_saved_local_names(
15251525
// Deref of the `Pin<&mut Self>` state argument.
15261526
mir::ProjectionElem::Field(..),
15271527
mir::ProjectionElem::Deref,
1528-
15291528
// Field of a variant of the state.
15301529
mir::ProjectionElem::Downcast(_, variant),
15311530
mir::ProjectionElem::Field(field, _),
15321531
] => {
1533-
let name = &mut generator_saved_local_names[
1534-
generator_layout.variant_fields[variant][field]
1535-
];
1532+
let name = &mut generator_saved_local_names
1533+
[generator_layout.variant_fields[variant][field]];
15361534
if name.is_none() {
15371535
name.replace(var.name);
15381536
}

compiler/rustc_errors/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![feature(crate_visibility_modifier)]
77
#![feature(backtrace)]
88
#![feature(if_let_guard)]
9-
#![cfg_attr(bootstrap, feature(format_args_capture))]
109
#![feature(iter_zip)]
1110
#![feature(let_else)]
1211
#![feature(nll)]

compiler/rustc_expand/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(crate_visibility_modifier)]
22
#![feature(decl_macro)]
33
#![feature(destructuring_assignment)]
4-
#![cfg_attr(bootstrap, feature(format_args_capture))]
54
#![feature(if_let_guard)]
65
#![feature(iter_zip)]
76
#![feature(let_else)]

compiler/rustc_expand/src/mbe/macro_parser.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,7 @@ fn inner_parse_loop<'root, 'tt>(
584584
//
585585
// At the beginning of the loop, if we reach the end of the delimited submatcher,
586586
// we pop the stack to backtrack out of the descent.
587-
seq
588-
@
589-
(TokenTree::Delimited(..)
587+
seq @ (TokenTree::Delimited(..)
590588
| TokenTree::Token(Token { kind: DocComment(..), .. })) => {
591589
let lower_elts = mem::replace(&mut item.top_elts, Tt(seq));
592590
let idx = item.idx;

compiler/rustc_expand/src/parse/tests.rs

+19-10
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,33 @@ fn string_to_tts_macro() {
6565
let tts: &[TokenTree] = &tts[..];
6666

6767
match tts {
68-
[TokenTree::Token(Token { kind: token::Ident(name_macro_rules, false), .. }), TokenTree::Token(Token { kind: token::Not, .. }), TokenTree::Token(Token { kind: token::Ident(name_zip, false), .. }), TokenTree::Delimited(_, macro_delim, macro_tts)]
69-
if name_macro_rules == &kw::MacroRules && name_zip.as_str() == "zip" =>
70-
{
68+
[
69+
TokenTree::Token(Token { kind: token::Ident(name_macro_rules, false), .. }),
70+
TokenTree::Token(Token { kind: token::Not, .. }),
71+
TokenTree::Token(Token { kind: token::Ident(name_zip, false), .. }),
72+
TokenTree::Delimited(_, macro_delim, macro_tts),
73+
] if name_macro_rules == &kw::MacroRules && name_zip.as_str() == "zip" => {
7174
let tts = &macro_tts.trees().collect::<Vec<_>>();
7275
match &tts[..] {
73-
[TokenTree::Delimited(_, first_delim, first_tts), TokenTree::Token(Token { kind: token::FatArrow, .. }), TokenTree::Delimited(_, second_delim, second_tts)]
74-
if macro_delim == &token::Paren =>
75-
{
76+
[
77+
TokenTree::Delimited(_, first_delim, first_tts),
78+
TokenTree::Token(Token { kind: token::FatArrow, .. }),
79+
TokenTree::Delimited(_, second_delim, second_tts),
80+
] if macro_delim == &token::Paren => {
7681
let tts = &first_tts.trees().collect::<Vec<_>>();
7782
match &tts[..] {
78-
[TokenTree::Token(Token { kind: token::Dollar, .. }), TokenTree::Token(Token { kind: token::Ident(name, false), .. })]
79-
if first_delim == &token::Paren && name.as_str() == "a" => {}
83+
[
84+
TokenTree::Token(Token { kind: token::Dollar, .. }),
85+
TokenTree::Token(Token { kind: token::Ident(name, false), .. }),
86+
] if first_delim == &token::Paren && name.as_str() == "a" => {}
8087
_ => panic!("value 3: {:?} {:?}", first_delim, first_tts),
8188
}
8289
let tts = &second_tts.trees().collect::<Vec<_>>();
8390
match &tts[..] {
84-
[TokenTree::Token(Token { kind: token::Dollar, .. }), TokenTree::Token(Token { kind: token::Ident(name, false), .. })]
85-
if second_delim == &token::Paren && name.as_str() == "a" => {}
91+
[
92+
TokenTree::Token(Token { kind: token::Dollar, .. }),
93+
TokenTree::Token(Token { kind: token::Ident(name, false), .. }),
94+
] if second_delim == &token::Paren && name.as_str() == "a" => {}
8695
_ => panic!("value 4: {:?} {:?}", second_delim, second_tts),
8796
}
8897
}

compiler/rustc_lint/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#![feature(bool_to_option)]
3131
#![feature(box_patterns)]
3232
#![feature(crate_visibility_modifier)]
33-
#![cfg_attr(bootstrap, feature(format_args_capture))]
3433
#![feature(iter_order_by)]
3534
#![feature(iter_zip)]
3635
#![feature(let_else)]

compiler/rustc_middle/src/ty/context.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,11 @@ impl<'tcx> TyCtxt<'tcx> {
11111111
};
11121112
debug!("layout_scalar_valid_range: attr={:?}", attr);
11131113
if let Some(
1114-
&[ast::NestedMetaItem::Literal(ast::Lit { kind: ast::LitKind::Int(a, _), .. })],
1114+
&[
1115+
ast::NestedMetaItem::Literal(ast::Lit {
1116+
kind: ast::LitKind::Int(a, _), ..
1117+
}),
1118+
],
11151119
) = attr.meta_item_list().as_deref()
11161120
{
11171121
Bound::Included(a)

compiler/rustc_middle/src/ty/sty.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,17 @@ impl<'tcx> ClosureSubsts<'tcx> {
356356
/// The ordering assumed here must match that used by `ClosureSubsts::new` above.
357357
fn split(self) -> ClosureSubstsParts<'tcx, GenericArg<'tcx>> {
358358
match self.substs[..] {
359-
[ref parent_substs @ .., closure_kind_ty, closure_sig_as_fn_ptr_ty, tupled_upvars_ty] => {
360-
ClosureSubstsParts {
361-
parent_substs,
362-
closure_kind_ty,
363-
closure_sig_as_fn_ptr_ty,
364-
tupled_upvars_ty,
365-
}
366-
}
359+
[
360+
ref parent_substs @ ..,
361+
closure_kind_ty,
362+
closure_sig_as_fn_ptr_ty,
363+
tupled_upvars_ty,
364+
] => ClosureSubstsParts {
365+
parent_substs,
366+
closure_kind_ty,
367+
closure_sig_as_fn_ptr_ty,
368+
tupled_upvars_ty,
369+
},
367370
_ => bug!("closure substs missing synthetics"),
368371
}
369372
}

compiler/rustc_passes/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
88
#![feature(crate_visibility_modifier)]
99
#![feature(in_band_lifetimes)]
10-
#![cfg_attr(bootstrap, feature(format_args_capture))]
1110
#![feature(iter_zip)]
1211
#![feature(map_try_insert)]
1312
#![feature(min_specialization)]

compiler/rustc_resolve/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(drain_filter)]
1414
#![feature(bool_to_option)]
1515
#![feature(crate_visibility_modifier)]
16-
#![cfg_attr(bootstrap, feature(format_args_capture))]
1716
#![feature(iter_zip)]
1817
#![feature(let_else)]
1918
#![feature(never_type)]

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2026,9 +2026,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
20262026
debug!("maybe_suggest_unsized_generics: param={:?}", param);
20272027
match node {
20282028
hir::Node::Item(
2029-
item
2030-
@
2031-
hir::Item {
2029+
item @ hir::Item {
20322030
// Only suggest indirection for uses of type parameters in ADTs.
20332031
kind:
20342032
hir::ItemKind::Enum(..) | hir::ItemKind::Struct(..) | hir::ItemKind::Union(..),

compiler/rustc_typeck/src/check/coercion.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
11261126
for expr in exprs {
11271127
let expr = expr.as_coercion_site();
11281128
let noop = match self.typeck_results.borrow().expr_adjustments(expr) {
1129-
&[Adjustment { kind: Adjust::Deref(_), .. }, Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(_, mutbl_adj)), .. }] =>
1130-
{
1129+
&[
1130+
Adjustment { kind: Adjust::Deref(_), .. },
1131+
Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(_, mutbl_adj)), .. },
1132+
] => {
11311133
match *self.node_ty(expr.hir_id).kind() {
11321134
ty::Ref(_, _, mt_orig) => {
11331135
let mutbl_adj: hir::Mutability = mutbl_adj.into();

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

+16-10
Original file line numberDiff line numberDiff line change
@@ -304,20 +304,26 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
304304
// is a valid NeverToAny adjustment, because it can't
305305
// be reached.
306306
(&[Adjustment { kind: Adjust::NeverToAny, .. }], _) => return,
307-
(&[
308-
Adjustment { kind: Adjust::Deref(_), .. },
309-
Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(..)), .. },
310-
], &[
311-
Adjustment { kind: Adjust::Deref(_), .. },
312-
.. // Any following adjustments are allowed.
313-
]) => {
307+
(
308+
&[
309+
Adjustment { kind: Adjust::Deref(_), .. },
310+
Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(..)), .. },
311+
],
312+
&[
313+
Adjustment { kind: Adjust::Deref(_), .. },
314+
.., // Any following adjustments are allowed.
315+
],
316+
) => {
314317
// A reborrow has no effect before a dereference.
315318
}
316319
// FIXME: currently we never try to compose autoderefs
317320
// and ReifyFnPointer/UnsafeFnPointer, but we could.
318-
_ =>
319-
bug!("while adjusting {:?}, can't compose {:?} and {:?}",
320-
expr, entry.get(), adj)
321+
_ => bug!(
322+
"while adjusting {:?}, can't compose {:?} and {:?}",
323+
expr,
324+
entry.get(),
325+
adj
326+
),
321327
};
322328
*entry.get_mut() = adj;
323329
}

compiler/rustc_typeck/src/check/place_op.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
440440
}
441441

442442
// If we have an autoref followed by unsizing at the end, fix the unsize target.
443-
if let [.., Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(..)), .. }, Adjustment { kind: Adjust::Pointer(PointerCast::Unsize), ref mut target }] =
444-
adjustments[..]
443+
if let [
444+
..,
445+
Adjustment { kind: Adjust::Borrow(AutoBorrow::Ref(..)), .. },
446+
Adjustment { kind: Adjust::Pointer(PointerCast::Unsize), ref mut target },
447+
] = adjustments[..]
445448
{
446449
*target = method.sig.inputs()[0];
447450
}

compiler/rustc_typeck/src/check/upvar.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -687,15 +687,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
687687
r
688688
),
689689
(
690-
l
691-
@
692-
(ProjectionKind::Index
690+
l @ (ProjectionKind::Index
693691
| ProjectionKind::Subslice
694692
| ProjectionKind::Deref
695693
| ProjectionKind::Field(..)),
696-
r
697-
@
698-
(ProjectionKind::Index
694+
r @ (ProjectionKind::Index
699695
| ProjectionKind::Subslice
700696
| ProjectionKind::Deref
701697
| ProjectionKind::Field(..)),

compiler/rustc_typeck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
5858
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
5959
#![feature(bool_to_option)]
6060
#![feature(crate_visibility_modifier)]
61-
#![cfg_attr(bootstrap, feature(format_args_capture))]
6261
#![feature(if_let_guard)]
6362
#![feature(in_band_lifetimes)]
6463
#![feature(is_sorted)]

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
#![feature(fmt_internals)]
106106
#![feature(fn_traits)]
107107
#![feature(inherent_ascii_escape)]
108-
#![cfg_attr(bootstrap, feature(format_args_capture))]
109108
#![feature(inplace_iteration)]
110109
#![feature(iter_advance_by)]
111110
#![feature(iter_zip)]

0 commit comments

Comments
 (0)