Skip to content

Commit 8c7f2bf

Browse files
committed
Auto merge of #93482 - ehuss:rollup-qjyppci, r=ehuss
Rollup of 5 pull requests Successful merges: - #92887 (Bootstrap compiler update) - #92908 (Render more readable macro matcher tokens in rustdoc) - #93183 (rustdoc: mobile nav fixes) - #93192 (Add VS 2022 into error message) - #93475 (Add test to ensure that theme is applied correctly when going back in history) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7cc28c1 + 5e48378 commit 8c7f2bf

File tree

34 files changed

+739
-514
lines changed

34 files changed

+739
-514
lines changed

compiler/rustc_ast_pretty/src/pp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl Printer {
457457
self.break_offset(n, 0)
458458
}
459459

460-
crate fn zerobreak(&mut self) {
460+
pub fn zerobreak(&mut self) {
461461
self.spaces(0)
462462
}
463463

compiler/rustc_codegen_ssa/src/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>(
932932
but `link.exe` was not found",
933933
);
934934
sess.note_without_error(
935-
"please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 \
935+
"please ensure that VS 2013, VS 2015, VS 2017, VS 2019 or VS 2022 \
936936
was installed with the Visual C++ option",
937937
);
938938
}

compiler/rustc_expand/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(associated_type_defaults)]
33
#![feature(crate_visibility_modifier)]
44
#![feature(decl_macro)]
5-
#![cfg_attr(bootstrap, feature(destructuring_assignment))]
65
#![feature(if_let_guard)]
76
#![feature(let_else)]
87
#![feature(proc_macro_diagnostic)]

compiler/rustc_middle/src/query/mod.rs

+4-17
Original file line numberDiff line numberDiff line change
@@ -784,24 +784,11 @@ rustc_queries! {
784784
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key.to_def_id()) }
785785
cache_on_disk_if { true }
786786
load_cached(tcx, id) {
787-
#[cfg(bootstrap)]
788-
{
789-
match match tcx.on_disk_cache().as_ref() {
790-
Some(c) => c.try_load_query_result(*tcx, id),
791-
None => None,
792-
} {
793-
Some(x) => Some(&*tcx.arena.alloc(x)),
794-
None => None,
795-
}
796-
}
797-
#[cfg(not(bootstrap))]
798-
{
799-
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
800-
.on_disk_cache().as_ref()
801-
.and_then(|c| c.try_load_query_result(*tcx, id));
787+
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
788+
.on_disk_cache().as_ref()
789+
.and_then(|c| c.try_load_query_result(*tcx, id));
802790

803-
typeck_results.map(|x| &*tcx.arena.alloc(x))
804-
}
791+
typeck_results.map(|x| &*tcx.arena.alloc(x))
805792
}
806793
}
807794

library/alloc/src/lib.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,14 @@
6767
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
6868
test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
6969
)]
70-
#![cfg_attr(
71-
not(bootstrap),
72-
doc(cfg_hide(
73-
not(test),
74-
not(any(test, bootstrap)),
75-
any(not(feature = "miri-test-libstd"), test, doctest),
76-
no_global_oom_handling,
77-
not(no_global_oom_handling),
78-
target_has_atomic = "ptr"
79-
))
80-
)]
70+
#![doc(cfg_hide(
71+
not(test),
72+
not(any(test, bootstrap)),
73+
any(not(feature = "miri-test-libstd"), test, doctest),
74+
no_global_oom_handling,
75+
not(no_global_oom_handling),
76+
target_has_atomic = "ptr"
77+
))]
8178
#![no_std]
8279
#![needs_allocator]
8380
//
@@ -151,7 +148,6 @@
151148
#![feature(const_precise_live_drops)]
152149
#![feature(const_trait_impl)]
153150
#![feature(const_try)]
154-
#![cfg_attr(bootstrap, feature(destructuring_assignment))]
155151
#![feature(dropck_eyepatch)]
156152
#![feature(exclusive_range_pattern)]
157153
#![feature(fundamental)]

library/core/src/cell.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -1310,11 +1310,7 @@ impl Clone for BorrowRef<'_> {
13101310
///
13111311
/// See the [module-level documentation](self) for more.
13121312
#[stable(feature = "rust1", since = "1.0.0")]
1313-
#[cfg_attr(
1314-
not(bootstrap),
1315-
must_not_suspend = "holding a Ref across suspend \
1316-
points can cause BorrowErrors"
1317-
)]
1313+
#[must_not_suspend = "holding a Ref across suspend points can cause BorrowErrors"]
13181314
pub struct Ref<'b, T: ?Sized + 'b> {
13191315
value: &'b T,
13201316
borrow: BorrowRef<'b>,
@@ -1692,11 +1688,7 @@ impl<'b> BorrowRefMut<'b> {
16921688
///
16931689
/// See the [module-level documentation](self) for more.
16941690
#[stable(feature = "rust1", since = "1.0.0")]
1695-
#[cfg_attr(
1696-
not(bootstrap),
1697-
must_not_suspend = "holding a RefMut across suspend \
1698-
points can cause BorrowErrors"
1699-
)]
1691+
#[must_not_suspend = "holding a RefMut across suspend points can cause BorrowErrors"]
17001692
pub struct RefMut<'b, T: ?Sized + 'b> {
17011693
value: &'b mut T,
17021694
borrow: BorrowRefMut<'b>,

library/core/src/future/into_future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub trait IntoFuture {
1313

1414
/// Creates a future from a value.
1515
#[unstable(feature = "into_future", issue = "67644")]
16-
#[cfg_attr(not(bootstrap), lang = "into_future")]
16+
#[lang = "into_future"]
1717
fn into_future(self) -> Self::Future;
1818
}
1919

library/core/src/lib.rs

+23-26
Original file line numberDiff line numberDiff line change
@@ -60,32 +60,29 @@
6060
test(no_crate_inject, attr(deny(warnings))),
6161
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
6262
)]
63-
#![cfg_attr(
64-
not(bootstrap),
65-
doc(cfg_hide(
66-
not(test),
67-
any(not(feature = "miri-test-libstd"), test, doctest),
68-
no_fp_fmt_parse,
69-
target_pointer_width = "16",
70-
target_pointer_width = "32",
71-
target_pointer_width = "64",
72-
target_has_atomic = "8",
73-
target_has_atomic = "16",
74-
target_has_atomic = "32",
75-
target_has_atomic = "64",
76-
target_has_atomic = "ptr",
77-
target_has_atomic_equal_alignment = "8",
78-
target_has_atomic_equal_alignment = "16",
79-
target_has_atomic_equal_alignment = "32",
80-
target_has_atomic_equal_alignment = "64",
81-
target_has_atomic_equal_alignment = "ptr",
82-
target_has_atomic_load_store = "8",
83-
target_has_atomic_load_store = "16",
84-
target_has_atomic_load_store = "32",
85-
target_has_atomic_load_store = "64",
86-
target_has_atomic_load_store = "ptr",
87-
))
88-
)]
63+
#![doc(cfg_hide(
64+
not(test),
65+
any(not(feature = "miri-test-libstd"), test, doctest),
66+
no_fp_fmt_parse,
67+
target_pointer_width = "16",
68+
target_pointer_width = "32",
69+
target_pointer_width = "64",
70+
target_has_atomic = "8",
71+
target_has_atomic = "16",
72+
target_has_atomic = "32",
73+
target_has_atomic = "64",
74+
target_has_atomic = "ptr",
75+
target_has_atomic_equal_alignment = "8",
76+
target_has_atomic_equal_alignment = "16",
77+
target_has_atomic_equal_alignment = "32",
78+
target_has_atomic_equal_alignment = "64",
79+
target_has_atomic_equal_alignment = "ptr",
80+
target_has_atomic_load_store = "8",
81+
target_has_atomic_load_store = "16",
82+
target_has_atomic_load_store = "32",
83+
target_has_atomic_load_store = "64",
84+
target_has_atomic_load_store = "ptr",
85+
))]
8986
#![no_core]
9087
//
9188
// Lints:

library/core/src/macros/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ pub(crate) mod builtin {
10031003
/// assert_eq!(s, b"ABCDEF");
10041004
/// # }
10051005
/// ```
1006-
#[cfg(not(bootstrap))]
10071006
#[unstable(feature = "concat_bytes", issue = "87555")]
10081007
#[rustc_builtin_macro]
10091008
#[macro_export]

library/core/src/prelude/v1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ pub use crate::{
6565
issue = "87555",
6666
reason = "`concat_bytes` is not stable enough for use and is subject to change"
6767
)]
68-
#[cfg(not(bootstrap))]
6968
#[doc(no_inline)]
7069
pub use crate::concat_bytes;
7170

library/core/tests/cmp.rs

-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ fn cmp_default() {
204204
assert_eq!(Fool(false), Fool(true));
205205
}
206206

207-
#[cfg(not(bootstrap))]
208207
mod const_cmp {
209208
use super::*;
210209

library/core/tests/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ fn test_assume_can_be_in_const_contexts() {
3737
}
3838

3939
#[test]
40-
#[cfg(not(bootstrap))]
4140
const fn test_write_bytes_in_const_contexts() {
4241
use core::intrinsics::write_bytes;
4342

library/core/tests/ptr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ fn test_set_memory() {
251251
}
252252

253253
#[test]
254-
#[cfg(not(bootstrap))]
255254
fn test_set_memory_const() {
256255
const XS: [u8; 20] = {
257256
let mut xs = [0u8; 20];

library/std/src/lib.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,12 @@
195195
test(no_crate_inject, attr(deny(warnings))),
196196
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
197197
)]
198-
#![cfg_attr(
199-
not(bootstrap),
200-
doc(cfg_hide(
201-
not(test),
202-
not(any(test, bootstrap)),
203-
no_global_oom_handling,
204-
not(no_global_oom_handling)
205-
))
206-
)]
198+
#![doc(cfg_hide(
199+
not(test),
200+
not(any(test, bootstrap)),
201+
no_global_oom_handling,
202+
not(no_global_oom_handling)
203+
))]
207204
// Don't link to std. We are std.
208205
#![no_std]
209206
#![warn(deprecated_in_future)]
@@ -249,7 +246,7 @@
249246
#![feature(cfg_target_thread_local)]
250247
#![feature(char_error_internals)]
251248
#![feature(char_internals)]
252-
#![cfg_attr(not(bootstrap), feature(concat_bytes))]
249+
#![feature(concat_bytes)]
253250
#![feature(concat_idents)]
254251
#![feature(const_fn_floating_point_arithmetic)]
255252
#![feature(const_fn_fn_ptr_basics)]
@@ -585,7 +582,6 @@ pub use core::{
585582
issue = "87555",
586583
reason = "`concat_bytes` is not stable enough for use and is subject to change"
587584
)]
588-
#[cfg(not(bootstrap))]
589585
pub use core::concat_bytes;
590586

591587
#[stable(feature = "core_primitive", since = "1.43.0")]

library/std/src/prelude/v1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ pub use core::prelude::v1::{
4949
issue = "87555",
5050
reason = "`concat_bytes` is not stable enough for use and is subject to change"
5151
)]
52-
#[cfg(not(bootstrap))]
5352
#[doc(no_inline)]
5453
pub use core::prelude::v1::concat_bytes;
5554

library/std/src/sync/mutex.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,9 @@ unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {}
188188
/// [`lock`]: Mutex::lock
189189
/// [`try_lock`]: Mutex::try_lock
190190
#[must_use = "if unused the Mutex will immediately unlock"]
191-
#[cfg_attr(
192-
not(bootstrap),
193-
must_not_suspend = "holding a MutexGuard across suspend \
191+
#[must_not_suspend = "holding a MutexGuard across suspend \
194192
points can cause deadlocks, delays, \
195-
and cause Futures to not implement `Send`"
196-
)]
193+
and cause Futures to not implement `Send`"]
197194
#[stable(feature = "rust1", since = "1.0.0")]
198195
pub struct MutexGuard<'a, T: ?Sized + 'a> {
199196
lock: &'a Mutex<T>,

library/std/src/sync/rwlock.rs

+4-10
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,9 @@ unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
9595
/// [`read`]: RwLock::read
9696
/// [`try_read`]: RwLock::try_read
9797
#[must_use = "if unused the RwLock will immediately unlock"]
98-
#[cfg_attr(
99-
not(bootstrap),
100-
must_not_suspend = "holding a RwLockReadGuard across suspend \
98+
#[must_not_suspend = "holding a RwLockReadGuard across suspend \
10199
points can cause deadlocks, delays, \
102-
and cause Futures to not implement `Send`"
103-
)]
100+
and cause Futures to not implement `Send`"]
104101
#[stable(feature = "rust1", since = "1.0.0")]
105102
pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
106103
lock: &'a RwLock<T>,
@@ -121,12 +118,9 @@ unsafe impl<T: ?Sized + Sync> Sync for RwLockReadGuard<'_, T> {}
121118
/// [`write`]: RwLock::write
122119
/// [`try_write`]: RwLock::try_write
123120
#[must_use = "if unused the RwLock will immediately unlock"]
124-
#[cfg_attr(
125-
not(bootstrap),
126-
must_not_suspend = "holding a RwLockWriteGuard across suspend \
121+
#[must_not_suspend = "holding a RwLockWriteGuard across suspend \
127122
points can cause deadlocks, delays, \
128-
and cause Future's to not implement `Send`"
129-
)]
123+
and cause Future's to not implement `Send`"]
130124
#[stable(feature = "rust1", since = "1.0.0")]
131125
pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
132126
lock: &'a RwLock<T>,

src/bootstrap/builder.rs

+4-13
Original file line numberDiff line numberDiff line change
@@ -1088,20 +1088,11 @@ impl<'a> Builder<'a> {
10881088
}
10891089
};
10901090

1091-
// cfg(bootstrap) -- drop the compiler.stage == 0 branch.
1092-
if compiler.stage == 0 {
1093-
if use_new_symbol_mangling {
1094-
rustflags.arg("-Zsymbol-mangling-version=v0");
1095-
} else {
1096-
rustflags.arg("-Zsymbol-mangling-version=legacy");
1097-
}
1091+
if use_new_symbol_mangling {
1092+
rustflags.arg("-Csymbol-mangling-version=v0");
10981093
} else {
1099-
if use_new_symbol_mangling {
1100-
rustflags.arg("-Csymbol-mangling-version=v0");
1101-
} else {
1102-
rustflags.arg("-Csymbol-mangling-version=legacy");
1103-
rustflags.arg("-Zunstable-options");
1104-
}
1094+
rustflags.arg("-Csymbol-mangling-version=legacy");
1095+
rustflags.arg("-Zunstable-options");
11051096
}
11061097

11071098
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,

src/librustdoc/clean/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mod auto_trait;
55
mod blanket_impl;
66
crate mod cfg;
77
crate mod inline;
8+
mod render_macro_matchers;
89
mod simplify;
910
crate mod types;
1011
crate mod utils;

0 commit comments

Comments
 (0)