Skip to content

Commit 0f12bad

Browse files
committed
Auto merge of #66156 - Mark-Simulacrum:stage0-step, r=pietroalbini
Stage0 step r? @pietroalbini
2 parents a333eed + 994d836 commit 0f12bad

File tree

21 files changed

+51
-193
lines changed

21 files changed

+51
-193
lines changed

src/bootstrap/builder.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,18 @@ impl<'a> Builder<'a> {
886886
// things still build right, please do!
887887
match mode {
888888
Mode::Std => metadata.push_str("std"),
889-
_ => {},
889+
// When we're building rustc tools, they're built with a search path
890+
// that contains things built during the rustc build. For example,
891+
// bitflags is built during the rustc build, and is a dependency of
892+
// rustdoc as well. We're building rustdoc in a different target
893+
// directory, though, which means that Cargo will rebuild the
894+
// dependency. When we go on to build rustdoc, we'll look for
895+
// bitflags, and find two different copies: one built during the
896+
// rustc step and one that we just built. This isn't always a
897+
// problem, somehow -- not really clear why -- but we know that this
898+
// fixes things.
899+
Mode::ToolRustc => metadata.push_str("tool-rustc"),
900+
_ => {}
890901
}
891902
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);
892903

src/bootstrap/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use build_helper::output;
1313
use crate::Build;
1414

1515
// The version number
16-
pub const CFG_RELEASE_NUM: &str = "1.40.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.41.0";
1717

1818
pub struct GitInfo {
1919
inner: Option<Info>,

src/libcore/array/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ use crate::hash::{Hash, self};
1414
use crate::marker::Unsize;
1515
use crate::slice::{Iter, IterMut};
1616

17-
#[cfg(not(bootstrap))]
1817
mod iter;
1918

20-
#[cfg(not(bootstrap))]
2119
#[unstable(feature = "array_value_iter", issue = "65798")]
2220
pub use iter::IntoIter;
2321

src/libcore/convert.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ impl<T> From<T> for T {
557557
///
558558
/// [#64715]: https://github.com/rust-lang/rust/issues/64715
559559
#[stable(feature = "convert_infallible", since = "1.34.0")]
560-
#[cfg(not(bootstrap))]
561560
#[rustc_reservation_impl="permitting this impl would forbid us from adding \
562561
`impl<T> From<!> for T` later; see rust-lang/rust#64715 for details"]
563562
impl<T> From<!> for T {

src/libcore/intrinsics.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ extern "rust-intrinsic" {
697697
pub fn panic_if_uninhabited<T>();
698698

699699
/// Gets a reference to a static `Location` indicating where it was called.
700-
#[cfg(not(bootstrap))]
701700
pub fn caller_location() -> &'static crate::panic::Location<'static>;
702701

703702
/// Creates a value initialized to zero.
@@ -1346,7 +1345,6 @@ extern "rust-intrinsic" {
13461345
pub fn nontemporal_store<T>(ptr: *mut T, val: T);
13471346

13481347
/// See documentation of `<*const T>::offset_from` for details.
1349-
#[cfg(not(bootstrap))]
13501348
pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
13511349

13521350
/// Internal hook used by Miri to implement unwinding.

src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
#![feature(hexagon_target_feature)]
122122
#![feature(const_int_conversion)]
123123
#![feature(const_transmute)]
124-
#![cfg_attr(bootstrap, feature(non_exhaustive))]
125124
#![feature(structural_match)]
126125
#![feature(abi_unadjusted)]
127126
#![feature(adx_target_feature)]

src/libcore/macros.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
/// Panics the current thread.
22
///
33
/// For details, see `std::macros`.
4-
#[cfg(bootstrap)]
5-
#[macro_export]
6-
#[allow_internal_unstable(core_panic, panic_internals)]
7-
#[stable(feature = "core", since = "1.6.0")]
8-
macro_rules! panic {
9-
() => (
10-
$crate::panic!("explicit panic")
11-
);
12-
($msg:expr) => ({
13-
$crate::panicking::panic(&($msg, $crate::file!(), $crate::line!(), $crate::column!()))
14-
});
15-
($msg:expr,) => (
16-
$crate::panic!($msg)
17-
);
18-
($fmt:expr, $($arg:tt)+) => ({
19-
$crate::panicking::panic_fmt($crate::format_args!($fmt, $($arg)+),
20-
&($crate::file!(), $crate::line!(), $crate::column!()))
21-
});
22-
}
23-
24-
/// Panics the current thread.
25-
///
26-
/// For details, see `std::macros`.
27-
#[cfg(not(bootstrap))]
284
#[macro_export]
295
#[allow_internal_unstable(core_panic,
306
// FIXME(anp, eddyb) `core_intrinsics` is used here to allow calling

src/libcore/marker.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ pub trait Unsize<T: ?Sized> {
146146
///
147147
/// [RFC1445]: https://github.com/rust-lang/rfcs/blob/master/text/1445-restrict-constants-in-patterns.md
148148
/// [issue 63438]: https://github.com/rust-lang/rust/issues/63438
149-
#[cfg(not(bootstrap))]
150149
#[unstable(feature = "structural_match", issue = "31434")]
151150
#[rustc_on_unimplemented(message="the type `{Self}` does not `#[derive(PartialEq)]`")]
152151
#[lang = "structural_peq"]
@@ -197,7 +196,6 @@ pub trait StructuralPartialEq {
197196
/// As a hack to work around this, we use two separate traits injected by each
198197
/// of the two derives (`#[derive(PartialEq)]` and `#[derive(Eq)]`) and check
199198
/// that both of them are present as part of structural-match checking.
200-
#[cfg(not(bootstrap))]
201199
#[unstable(feature = "structural_match", issue = "31434")]
202200
#[rustc_on_unimplemented(message="the type `{Self}` does not `#[derive(Eq)]`")]
203201
#[lang = "structural_teq"]
@@ -517,11 +515,9 @@ macro_rules! impls{
517515
}
518516
}
519517

520-
#[cfg(not(bootstrap))]
521518
#[unstable(feature = "structural_match", issue = "31434")]
522519
impl<T: ?Sized> StructuralPartialEq for $t<T> { }
523520

524-
#[cfg(not(bootstrap))]
525521
#[unstable(feature = "structural_match", issue = "31434")]
526522
impl<T: ?Sized> StructuralEq for $t<T> { }
527523
)

src/libcore/ops/try.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,7 @@
55
/// extracting those success or failure values from an existing instance and
66
/// creating a new instance from a success or failure value.
77
#[unstable(feature = "try_trait", issue = "42327")]
8-
#[cfg_attr(bootstrap, rustc_on_unimplemented(
9-
on(all(
10-
any(from_method="from_error", from_method="from_ok"),
11-
from_desugaring="QuestionMark"),
12-
message="the `?` operator can only be used in a \
13-
function that returns `Result` or `Option` \
14-
(or another type that implements `{Try}`)",
15-
label="cannot use the `?` operator in a function that returns `{Self}`"),
16-
on(all(from_method="into_result", from_desugaring="QuestionMark"),
17-
message="the `?` operator can only be applied to values \
18-
that implement `{Try}`",
19-
label="the `?` operator cannot be applied to type `{Self}`")
20-
))]
21-
#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
8+
#[rustc_on_unimplemented(
229
on(all(
2310
any(from_method="from_error", from_method="from_ok"),
2411
from_desugaring="QuestionMark"),
@@ -30,7 +17,7 @@ on(all(from_method="into_result", from_desugaring="QuestionMark"),
3017
message="the `?` operator can only be applied to values \
3118
that implement `{Try}`",
3219
label="the `?` operator cannot be applied to type `{Self}`")
33-
))]
20+
)]
3421
#[doc(alias = "?")]
3522
pub trait Try {
3623
/// The type of this value when viewed as successful.

src/libcore/panic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl fmt::Display for PanicInfo<'_> {
167167
///
168168
/// panic!("Normal panic");
169169
/// ```
170-
#[cfg_attr(not(bootstrap), lang = "panic_location")]
170+
#[lang = "panic_location"]
171171
#[derive(Debug)]
172172
#[stable(feature = "panic_hooks", since = "1.10.0")]
173173
pub struct Location<'a> {

0 commit comments

Comments
 (0)