Skip to content

Commit ada8c80

Browse files
committed
Auto merge of rust-lang#98673 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum
Bump bootstrap compiler r? `@Mark-Simulacrum`
2 parents 8c52a83 + d8bfae4 commit ada8c80

File tree

27 files changed

+423
-559
lines changed

27 files changed

+423
-559
lines changed

compiler/rustc_borrowck/src/borrowck_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
478478
struct_span_err!(self, span, E0716, "temporary value dropped while borrowed",)
479479
}
480480

481-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
481+
#[rustc_lint_diagnostics]
482482
fn struct_span_err_with_code<S: Into<MultiSpan>>(
483483
&self,
484484
sp: S,

compiler/rustc_errors/src/diagnostic.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl Diagnostic {
286286
///
287287
/// This span is *not* considered a ["primary span"][`MultiSpan`]; only
288288
/// the `Span` supplied when creating the diagnostic is primary.
289-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
289+
#[rustc_lint_diagnostics]
290290
pub fn span_label(&mut self, span: Span, label: impl Into<SubdiagnosticMessage>) -> &mut Self {
291291
self.span.push_span_label(span, self.subdiagnostic_message_to_diagnostic_message(label));
292292
self
@@ -405,7 +405,7 @@ impl Diagnostic {
405405
}
406406

407407
/// Add a note attached to this diagnostic.
408-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
408+
#[rustc_lint_diagnostics]
409409
pub fn note(&mut self, msg: impl Into<SubdiagnosticMessage>) -> &mut Self {
410410
self.sub(Level::Note, msg, MultiSpan::new(), None);
411411
self
@@ -428,7 +428,7 @@ impl Diagnostic {
428428

429429
/// Prints the span with a note above it.
430430
/// This is like [`Diagnostic::note()`], but it gets its own span.
431-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
431+
#[rustc_lint_diagnostics]
432432
pub fn span_note<S: Into<MultiSpan>>(
433433
&mut self,
434434
sp: S,
@@ -450,15 +450,15 @@ impl Diagnostic {
450450
}
451451

452452
/// Add a warning attached to this diagnostic.
453-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
453+
#[rustc_lint_diagnostics]
454454
pub fn warn(&mut self, msg: impl Into<SubdiagnosticMessage>) -> &mut Self {
455455
self.sub(Level::Warning(None), msg, MultiSpan::new(), None);
456456
self
457457
}
458458

459459
/// Prints the span with a warning above it.
460460
/// This is like [`Diagnostic::warn()`], but it gets its own span.
461-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
461+
#[rustc_lint_diagnostics]
462462
pub fn span_warn<S: Into<MultiSpan>>(
463463
&mut self,
464464
sp: S,
@@ -469,7 +469,7 @@ impl Diagnostic {
469469
}
470470

471471
/// Add a help message attached to this diagnostic.
472-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
472+
#[rustc_lint_diagnostics]
473473
pub fn help(&mut self, msg: impl Into<SubdiagnosticMessage>) -> &mut Self {
474474
self.sub(Level::Help, msg, MultiSpan::new(), None);
475475
self
@@ -483,7 +483,7 @@ impl Diagnostic {
483483

484484
/// Prints the span with some help above it.
485485
/// This is like [`Diagnostic::help()`], but it gets its own span.
486-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
486+
#[rustc_lint_diagnostics]
487487
pub fn span_help<S: Into<MultiSpan>>(
488488
&mut self,
489489
sp: S,

compiler/rustc_errors/src/lib.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ impl Handler {
649649
/// Attempting to `.emit()` the builder will only emit if either:
650650
/// * `can_emit_warnings` is `true`
651651
/// * `is_force_warn` was set in `DiagnosticId::Lint`
652-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
652+
#[rustc_lint_diagnostics]
653653
pub fn struct_span_warn(
654654
&self,
655655
span: impl Into<MultiSpan>,
@@ -678,7 +678,7 @@ impl Handler {
678678
}
679679

680680
/// Construct a builder at the `Allow` level at the given `span` and with the `msg`.
681-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
681+
#[rustc_lint_diagnostics]
682682
pub fn struct_span_allow(
683683
&self,
684684
span: impl Into<MultiSpan>,
@@ -691,7 +691,7 @@ impl Handler {
691691

692692
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
693693
/// Also include a code.
694-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
694+
#[rustc_lint_diagnostics]
695695
pub fn struct_span_warn_with_code(
696696
&self,
697697
span: impl Into<MultiSpan>,
@@ -708,7 +708,7 @@ impl Handler {
708708
/// Attempting to `.emit()` the builder will only emit if either:
709709
/// * `can_emit_warnings` is `true`
710710
/// * `is_force_warn` was set in `DiagnosticId::Lint`
711-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
711+
#[rustc_lint_diagnostics]
712712
pub fn struct_warn(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
713713
DiagnosticBuilder::new(self, Level::Warning(None), msg)
714714
}
@@ -728,13 +728,13 @@ impl Handler {
728728
}
729729

730730
/// Construct a builder at the `Allow` level with the `msg`.
731-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
731+
#[rustc_lint_diagnostics]
732732
pub fn struct_allow(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
733733
DiagnosticBuilder::new(self, Level::Allow, msg)
734734
}
735735

736736
/// Construct a builder at the `Expect` level with the `msg`.
737-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
737+
#[rustc_lint_diagnostics]
738738
pub fn struct_expect(
739739
&self,
740740
msg: impl Into<DiagnosticMessage>,
@@ -744,7 +744,7 @@ impl Handler {
744744
}
745745

746746
/// Construct a builder at the `Error` level at the given `span` and with the `msg`.
747-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
747+
#[rustc_lint_diagnostics]
748748
pub fn struct_span_err(
749749
&self,
750750
span: impl Into<MultiSpan>,
@@ -756,7 +756,7 @@ impl Handler {
756756
}
757757

758758
/// Construct a builder at the `Error` level at the given `span`, with the `msg`, and `code`.
759-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
759+
#[rustc_lint_diagnostics]
760760
pub fn struct_span_err_with_code(
761761
&self,
762762
span: impl Into<MultiSpan>,
@@ -770,7 +770,7 @@ impl Handler {
770770

771771
/// Construct a builder at the `Error` level with the `msg`.
772772
// FIXME: This method should be removed (every error should have an associated error code).
773-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
773+
#[rustc_lint_diagnostics]
774774
pub fn struct_err(
775775
&self,
776776
msg: impl Into<DiagnosticMessage>,
@@ -785,7 +785,7 @@ impl Handler {
785785
}
786786

787787
/// Construct a builder at the `Error` level with the `msg` and the `code`.
788-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
788+
#[rustc_lint_diagnostics]
789789
pub fn struct_err_with_code(
790790
&self,
791791
msg: impl Into<DiagnosticMessage>,
@@ -797,7 +797,7 @@ impl Handler {
797797
}
798798

799799
/// Construct a builder at the `Warn` level with the `msg` and the `code`.
800-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
800+
#[rustc_lint_diagnostics]
801801
pub fn struct_warn_with_code(
802802
&self,
803803
msg: impl Into<DiagnosticMessage>,
@@ -809,7 +809,7 @@ impl Handler {
809809
}
810810

811811
/// Construct a builder at the `Fatal` level at the given `span` and with the `msg`.
812-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
812+
#[rustc_lint_diagnostics]
813813
pub fn struct_span_fatal(
814814
&self,
815815
span: impl Into<MultiSpan>,
@@ -821,7 +821,7 @@ impl Handler {
821821
}
822822

823823
/// Construct a builder at the `Fatal` level at the given `span`, with the `msg`, and `code`.
824-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
824+
#[rustc_lint_diagnostics]
825825
pub fn struct_span_fatal_with_code(
826826
&self,
827827
span: impl Into<MultiSpan>,
@@ -834,33 +834,33 @@ impl Handler {
834834
}
835835

836836
/// Construct a builder at the `Error` level with the `msg`.
837-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
837+
#[rustc_lint_diagnostics]
838838
pub fn struct_fatal(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, !> {
839839
DiagnosticBuilder::new_fatal(self, msg)
840840
}
841841

842842
/// Construct a builder at the `Help` level with the `msg`.
843-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
843+
#[rustc_lint_diagnostics]
844844
pub fn struct_help(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
845845
DiagnosticBuilder::new(self, Level::Help, msg)
846846
}
847847

848848
/// Construct a builder at the `Note` level with the `msg`.
849-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
849+
#[rustc_lint_diagnostics]
850850
pub fn struct_note_without_error(
851851
&self,
852852
msg: impl Into<DiagnosticMessage>,
853853
) -> DiagnosticBuilder<'_, ()> {
854854
DiagnosticBuilder::new(self, Level::Note, msg)
855855
}
856856

857-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
857+
#[rustc_lint_diagnostics]
858858
pub fn span_fatal(&self, span: impl Into<MultiSpan>, msg: impl Into<DiagnosticMessage>) -> ! {
859859
self.emit_diag_at_span(Diagnostic::new(Fatal, msg), span);
860860
FatalError.raise()
861861
}
862862

863-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
863+
#[rustc_lint_diagnostics]
864864
pub fn span_fatal_with_code(
865865
&self,
866866
span: impl Into<MultiSpan>,
@@ -871,7 +871,7 @@ impl Handler {
871871
FatalError.raise()
872872
}
873873

874-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
874+
#[rustc_lint_diagnostics]
875875
pub fn span_err(
876876
&self,
877877
span: impl Into<MultiSpan>,
@@ -880,7 +880,7 @@ impl Handler {
880880
self.emit_diag_at_span(Diagnostic::new(Error { lint: false }, msg), span).unwrap()
881881
}
882882

883-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
883+
#[rustc_lint_diagnostics]
884884
pub fn span_err_with_code(
885885
&self,
886886
span: impl Into<MultiSpan>,
@@ -893,12 +893,12 @@ impl Handler {
893893
);
894894
}
895895

896-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
896+
#[rustc_lint_diagnostics]
897897
pub fn span_warn(&self, span: impl Into<MultiSpan>, msg: impl Into<DiagnosticMessage>) {
898898
self.emit_diag_at_span(Diagnostic::new(Warning(None), msg), span);
899899
}
900900

901-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
901+
#[rustc_lint_diagnostics]
902902
pub fn span_warn_with_code(
903903
&self,
904904
span: impl Into<MultiSpan>,

compiler/rustc_expand/src/base.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ impl<'a> ExtCtxt<'a> {
10771077
self.current_expansion.id.expansion_cause()
10781078
}
10791079

1080-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
1080+
#[rustc_lint_diagnostics]
10811081
pub fn struct_span_err<S: Into<MultiSpan>>(
10821082
&self,
10831083
sp: S,
@@ -1102,11 +1102,11 @@ impl<'a> ExtCtxt<'a> {
11021102
///
11031103
/// Compilation will be stopped in the near future (at the end of
11041104
/// the macro expansion phase).
1105-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
1105+
#[rustc_lint_diagnostics]
11061106
pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
11071107
self.sess.parse_sess.span_diagnostic.span_err(sp, msg);
11081108
}
1109-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
1109+
#[rustc_lint_diagnostics]
11101110
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) {
11111111
self.sess.parse_sess.span_diagnostic.span_warn(sp, msg);
11121112
}

compiler/rustc_parse/src/parser/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl<'a> DerefMut for SnapshotParser<'a> {
357357
}
358358

359359
impl<'a> Parser<'a> {
360-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
360+
#[rustc_lint_diagnostics]
361361
pub(super) fn span_err<S: Into<MultiSpan>>(
362362
&self,
363363
sp: S,
@@ -366,7 +366,7 @@ impl<'a> Parser<'a> {
366366
err.span_err(sp, self.diagnostic())
367367
}
368368

369-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
369+
#[rustc_lint_diagnostics]
370370
pub fn struct_span_err<S: Into<MultiSpan>>(
371371
&self,
372372
sp: S,

compiler/rustc_resolve/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(let_chains)]
1414
#![feature(let_else)]
1515
#![feature(never_type)]
16-
#![cfg_attr(bootstrap, feature(nll))]
1716
#![recursion_limit = "256"]
1817
#![allow(rustdoc::private_intra_doc_links)]
1918
#![allow(rustc::potential_query_instability)]

compiler/rustc_session/src/config.rs

-43
Original file line numberDiff line numberDiff line change
@@ -1102,49 +1102,6 @@ impl CrateCheckConfig {
11021102
.extend(atomic_values);
11031103

11041104
// Target specific values
1105-
#[cfg(bootstrap)]
1106-
{
1107-
for target in TARGETS
1108-
.iter()
1109-
.map(|target| Target::expect_builtin(&TargetTriple::from_triple(target)))
1110-
{
1111-
self.values_valid
1112-
.entry(sym::target_os)
1113-
.or_default()
1114-
.insert(Symbol::intern(&target.options.os));
1115-
self.values_valid
1116-
.entry(sym::target_family)
1117-
.or_default()
1118-
.extend(target.options.families.iter().map(|family| Symbol::intern(family)));
1119-
self.values_valid
1120-
.entry(sym::target_arch)
1121-
.or_default()
1122-
.insert(Symbol::intern(&target.arch));
1123-
self.values_valid
1124-
.entry(sym::target_endian)
1125-
.or_default()
1126-
.insert(Symbol::intern(&target.options.endian.as_str()));
1127-
self.values_valid
1128-
.entry(sym::target_env)
1129-
.or_default()
1130-
.insert(Symbol::intern(&target.options.env));
1131-
self.values_valid
1132-
.entry(sym::target_abi)
1133-
.or_default()
1134-
.insert(Symbol::intern(&target.options.abi));
1135-
self.values_valid
1136-
.entry(sym::target_vendor)
1137-
.or_default()
1138-
.insert(Symbol::intern(&target.options.vendor));
1139-
self.values_valid
1140-
.entry(sym::target_pointer_width)
1141-
.or_default()
1142-
.insert(sym::integer(target.pointer_width));
1143-
}
1144-
}
1145-
1146-
// Target specific values
1147-
#[cfg(not(bootstrap))]
11481105
{
11491106
const VALUES: [&Symbol; 8] = [
11501107
&sym::target_os,

compiler/rustc_session/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![feature(once_cell)]
77
#![feature(option_get_or_insert_default)]
88
#![feature(rustc_attrs)]
9-
#![cfg_attr(not(bootstrap), feature(map_many_mut))]
9+
#![feature(map_many_mut)]
1010
#![recursion_limit = "256"]
1111
#![allow(rustc::potential_query_instability)]
1212

compiler/rustc_session/src/parse.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,15 @@ impl ParseSess {
311311
self.create_warning(warning).emit()
312312
}
313313

314-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
314+
#[rustc_lint_diagnostics]
315315
pub fn struct_err(
316316
&self,
317317
msg: impl Into<DiagnosticMessage>,
318318
) -> DiagnosticBuilder<'_, ErrorGuaranteed> {
319319
self.span_diagnostic.struct_err(msg)
320320
}
321321

322-
#[cfg_attr(not(bootstrap), rustc_lint_diagnostics)]
322+
#[rustc_lint_diagnostics]
323323
pub fn struct_warn(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
324324
self.span_diagnostic.struct_warn(msg)
325325
}

0 commit comments

Comments
 (0)