diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index db289a64046a7..80448605c9381 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -54,9 +54,9 @@ declare_features! ( /// Allows using ADX intrinsics from `core::arch::{x86, x86_64}`. (accepted, adx_target_feature, "1.61.0", Some(44839), None), /// Allows explicit discriminants on non-unit enum variants. - (accepted, arbitrary_enum_discriminant, "CURRENT_RUSTC_VERSION", Some(60553), None), + (accepted, arbitrary_enum_discriminant, "1.66.0", Some(60553), None), /// Allows using `sym` operands in inline assembly. - (accepted, asm_sym, "CURRENT_RUSTC_VERSION", Some(93333), None), + (accepted, asm_sym, "1.66.0", Some(93333), None), /// Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646), None), /// Allows using associated `type`s in `trait`s. @@ -174,7 +174,7 @@ declare_features! ( // FIXME: explain `globs`. (accepted, globs, "1.0.0", None, None), /// Allows using `..=X` as a pattern. - (accepted, half_open_range_patterns, "CURRENT_RUSTC_VERSION", Some(67264), None), + (accepted, half_open_range_patterns, "1.66.0", Some(67264), None), /// Allows using the `u128` and `i128` types. (accepted, i128_type, "1.26.0", Some(35118), None), /// Allows the use of `if let` expressions. diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 4facb6140a300..647ccdec7742f 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -309,7 +309,7 @@ declare_features! ( /// Allows `async || body` closures. (active, async_closure, "1.37.0", Some(62290), None), /// Alows async functions to be declared, implemented, and used in traits. - (incomplete, async_fn_in_trait, "CURRENT_RUSTC_VERSION", Some(91611), None), + (incomplete, async_fn_in_trait, "1.66.0", Some(91611), None), /// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries. (active, c_unwind, "1.52.0", Some(74990), None), /// Allows using C-variadics. @@ -409,7 +409,7 @@ declare_features! ( /// Allows non-trivial generic constants which have to have wfness manually propagated to callers (incomplete, generic_const_exprs, "1.56.0", Some(76560), None), /// Allows using `..=X` as a patterns in slices. - (active, half_open_range_patterns_in_slices, "CURRENT_RUSTC_VERSION", Some(67264), None), + (active, half_open_range_patterns_in_slices, "1.66.0", Some(67264), None), /// Allows `if let` guard in match arms. (active, if_let_guard, "1.47.0", Some(51114), None), /// Allows using imported `main` function diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index b7e7d5a38a5b1..d6681a317d5a1 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1659,7 +1659,7 @@ impl TryFrom> for Box<[T; N]> { } #[cfg(not(no_global_oom_handling))] -#[stable(feature = "boxed_array_try_from_vec", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "boxed_array_try_from_vec", since = "1.66.0")] impl TryFrom> for Box<[T; N]> { type Error = Vec; diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index c4c75e46a2a3b..8a77193471234 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -580,7 +580,7 @@ impl BTreeMap { /// map.insert(1, "a"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_btree_new", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")] #[must_use] pub const fn new() -> BTreeMap { BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData } @@ -711,7 +711,7 @@ impl BTreeMap { /// map.insert(2, "a"); /// assert_eq!(map.first_key_value(), Some((&1, &"b"))); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn first_key_value(&self) -> Option<(&K, &V)> where K: Ord, @@ -739,7 +739,7 @@ impl BTreeMap { /// assert_eq!(*map.get(&1).unwrap(), "first"); /// assert_eq!(*map.get(&2).unwrap(), "b"); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn first_entry(&mut self) -> Option> where K: Ord, @@ -773,7 +773,7 @@ impl BTreeMap { /// } /// assert!(map.is_empty()); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn pop_first(&mut self) -> Option<(K, V)> where K: Ord, @@ -796,7 +796,7 @@ impl BTreeMap { /// map.insert(2, "a"); /// assert_eq!(map.last_key_value(), Some((&2, &"a"))); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn last_key_value(&self) -> Option<(&K, &V)> where K: Ord, @@ -824,7 +824,7 @@ impl BTreeMap { /// assert_eq!(*map.get(&1).unwrap(), "a"); /// assert_eq!(*map.get(&2).unwrap(), "last"); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn last_entry(&mut self) -> Option> where K: Ord, @@ -858,7 +858,7 @@ impl BTreeMap { /// } /// assert!(map.is_empty()); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn pop_last(&mut self) -> Option<(K, V)> where K: Ord, diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index b8e5cf8eb5a82..4ddb211925202 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -343,7 +343,7 @@ impl BTreeSet { /// let mut set: BTreeSet = BTreeSet::new(); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_btree_new", since = "CURRENT_RUSTC_VERSION")] + #[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")] #[must_use] pub const fn new() -> BTreeSet { BTreeSet { map: BTreeMap::new() } @@ -796,7 +796,7 @@ impl BTreeSet { /// assert_eq!(set.first(), Some(&1)); /// ``` #[must_use] - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn first(&self) -> Option<&T> where T: Ord, @@ -822,7 +822,7 @@ impl BTreeSet { /// assert_eq!(set.last(), Some(&2)); /// ``` #[must_use] - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn last(&self) -> Option<&T> where T: Ord, @@ -846,7 +846,7 @@ impl BTreeSet { /// } /// assert!(set.is_empty()); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn pop_first(&mut self) -> Option where T: Ord, @@ -870,7 +870,7 @@ impl BTreeSet { /// } /// assert!(set.is_empty()); /// ``` - #[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "map_first_last", since = "1.66.0")] pub fn pop_last(&mut self) -> Option where T: Ord, diff --git a/library/core/src/error.rs b/library/core/src/error.rs index 89053060fbbea..2738b499479f5 100644 --- a/library/core/src/error.rs +++ b/library/core/src/error.rs @@ -493,7 +493,7 @@ impl Error for crate::char::ParseCharError { } } -#[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "duration_checked_float", since = "1.66.0")] impl Error for crate::time::TryFromFloatSecsError {} #[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")] diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 3412d3730d011..c53175ba4f3f0 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -220,7 +220,7 @@ pub fn spin_loop() { /// /// [`std::convert::identity`]: crate::convert::identity #[inline] -#[stable(feature = "bench_black_box", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "bench_black_box", since = "1.66.0")] #[rustc_const_unstable(feature = "const_black_box", issue = "none")] pub const fn black_box(dummy: T) -> T { crate::intrinsics::black_box(dummy) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 81f050cb283d4..914dca61bc0c6 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -467,8 +467,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_unsigned(2), Some(3));")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add_unsigned(3), None);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -535,8 +535,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_sub_unsigned(2), Some(-1));")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).checked_sub_unsigned(3), None);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -905,8 +905,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_unsigned(2), 3);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_add_unsigned(100), ", stringify!($SelfT), "::MAX);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -951,8 +951,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".saturating_sub_unsigned(127), -27);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.saturating_sub_unsigned(100), ", stringify!($SelfT), "::MIN);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1129,8 +1129,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(100", stringify!($SelfT), ".wrapping_add_unsigned(27), 127);")] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.wrapping_add_unsigned(2), ", stringify!($SelfT), "::MIN + 1);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -1169,8 +1169,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(0", stringify!($SelfT), ".wrapping_sub_unsigned(127), -127);")] #[doc = concat!("assert_eq!((-2", stringify!($SelfT), ").wrapping_sub_unsigned(", stringify!($UnsignedT), "::MAX), -1);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline(always)] @@ -1566,8 +1566,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN).overflowing_add_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MAX, false));")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).overflowing_add_unsigned(3), (", stringify!($SelfT), "::MIN, true));")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1648,8 +1648,8 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX).overflowing_sub_unsigned(", stringify!($UnsignedT), "::MAX), (", stringify!($SelfT), "::MIN, false));")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MIN + 2).overflowing_sub_unsigned(3), (", stringify!($SelfT), "::MAX, true));")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 93f65c5c7aaf3..335cc5124047a 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -478,8 +478,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".checked_add_signed(-2), None);")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).checked_add_signed(3), None);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1025,8 +1025,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".saturating_add_signed(-2), 0);")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).saturating_add_signed(4), ", stringify!($SelfT), "::MAX);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1165,8 +1165,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".wrapping_add_signed(-2), ", stringify!($SelfT), "::MAX);")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).wrapping_add_signed(4), 1);")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] @@ -1534,8 +1534,8 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(1", stringify!($SelfT), ".overflowing_add_signed(-2), (", stringify!($SelfT), "::MAX, true));")] #[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX - 2).overflowing_add_signed(4), (1, true));")] /// ``` - #[stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] - #[rustc_const_stable(feature = "mixed_integer_ops", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "mixed_integer_ops", since = "1.66.0")] + #[rustc_const_stable(feature = "mixed_integer_ops", since = "1.66.0")] #[must_use = "this returns the result of the operation, \ without modifying the original"] #[inline] diff --git a/library/core/src/option.rs b/library/core/src/option.rs index a81dbc6924fb7..f284b43595576 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1720,7 +1720,7 @@ impl Option<(T, U)> { /// assert_eq!(y.unzip(), (None, None)); /// ``` #[inline] - #[stable(feature = "unzip_option", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "unzip_option", since = "1.66.0")] #[rustc_const_unstable(feature = "const_option", issue = "67441")] pub const fn unzip(self) -> (Option, Option) where diff --git a/library/core/src/time.rs b/library/core/src/time.rs index 37c3611d0a908..ba1cb6efa04b6 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -1232,7 +1232,7 @@ impl fmt::Debug for Duration { /// } /// ``` #[derive(Debug, Clone, PartialEq, Eq)] -#[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "duration_checked_float", since = "1.66.0")] pub struct TryFromFloatSecsError { kind: TryFromFloatSecsErrorKind, } @@ -1250,7 +1250,7 @@ impl TryFromFloatSecsError { } } -#[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "duration_checked_float", since = "1.66.0")] impl fmt::Display for TryFromFloatSecsError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.description().fmt(f) @@ -1401,7 +1401,7 @@ impl Duration { /// let res = Duration::try_from_secs_f32(val); /// assert_eq!(res, Ok(Duration::new(1, 2_929_688))); /// ``` - #[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "duration_checked_float", since = "1.66.0")] #[rustc_const_unstable(feature = "duration_consts_float", issue = "72440")] #[inline] pub const fn try_from_secs_f32(secs: f32) -> Result { @@ -1478,7 +1478,7 @@ impl Duration { /// let res = Duration::try_from_secs_f64(val); /// assert_eq!(res, Ok(Duration::new(1, 2_929_688))); /// ``` - #[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "duration_checked_float", since = "1.66.0")] #[rustc_const_unstable(feature = "duration_consts_float", issue = "72440")] #[inline] pub const fn try_from_secs_f64(secs: f64) -> Result { diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 8001fcff6484b..0d3fc2c5244e0 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -546,7 +546,7 @@ impl Span { /// Note: The observable result of a macro should only rely on the tokens and /// not on this source text. The result of this function is a best effort to /// be used for diagnostics only. - #[stable(feature = "proc_macro_source_text", since = "CURRENT_RUSTC_VERSION")] + #[stable(feature = "proc_macro_source_text", since = "1.66.0")] pub fn source_text(&self) -> Option { self.0.source_text() } diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 34e18b5fa8778..ecd06ebf743ab 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -43,7 +43,7 @@ use crate::sys_common::{FromInner, IntoInner}; #[stable(feature = "time", since = "1.3.0")] pub use core::time::Duration; -#[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")] +#[stable(feature = "duration_checked_float", since = "1.66.0")] pub use core::time::TryFromFloatSecsError; /// A measurement of a monotonically nondecreasing clock. diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index c636d4c2b47f0..12585e80e6b7e 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1427,7 +1427,7 @@ impl Step for Extended { let xform = |p: &Path| { let mut contents = t!(fs::read_to_string(p)); - for tool in &["rust-demangler"] { + for tool in &["rust-demangler", "miri"] { if !built_tools.contains(tool) { contents = filter(&contents, tool); } @@ -1467,9 +1467,8 @@ impl Step for Extended { prepare("rust-std"); prepare("rust-analysis"); prepare("clippy"); - prepare("miri"); prepare("rust-analyzer"); - for tool in &["rust-docs", "rust-demangler"] { + for tool in &["rust-docs", "rust-demangler", "miri"] { if built_tools.contains(tool) { prepare(tool); } @@ -1528,9 +1527,8 @@ impl Step for Extended { prepare("rust-docs"); prepare("rust-std"); prepare("clippy"); - prepare("miri"); prepare("rust-analyzer"); - for tool in &["rust-demangler"] { + for tool in &["rust-demangler", "miri"] { if built_tools.contains(tool) { prepare(tool); } @@ -1667,23 +1665,25 @@ impl Step for Extended { .arg(etc.join("msi/remove-duplicates.xsl")), ); } - builder.run( - Command::new(&heat) - .current_dir(&exe) - .arg("dir") - .arg("miri") - .args(&heat_flags) - .arg("-cg") - .arg("MiriGroup") - .arg("-dr") - .arg("Miri") - .arg("-var") - .arg("var.MiriDir") - .arg("-out") - .arg(exe.join("MiriGroup.wxs")) - .arg("-t") - .arg(etc.join("msi/remove-duplicates.xsl")), - ); + if built_tools.contains("miri") { + builder.run( + Command::new(&heat) + .current_dir(&exe) + .arg("dir") + .arg("miri") + .args(&heat_flags) + .arg("-cg") + .arg("MiriGroup") + .arg("-dr") + .arg("Miri") + .arg("-var") + .arg("var.MiriDir") + .arg("-out") + .arg(exe.join("MiriGroup.wxs")) + .arg("-t") + .arg(etc.join("msi/remove-duplicates.xsl")), + ); + } builder.run( Command::new(&heat) .current_dir(&exe) @@ -1731,7 +1731,6 @@ impl Step for Extended { .arg("-dStdDir=rust-std") .arg("-dAnalysisDir=rust-analysis") .arg("-dClippyDir=clippy") - .arg("-dMiriDir=miri") .arg("-arch") .arg(&arch) .arg("-out") @@ -1745,6 +1744,9 @@ impl Step for Extended { if built_tools.contains("rust-analyzer") { cmd.arg("-dRustAnalyzerDir=rust-analyzer"); } + if built_tools.contains("miri") { + cmd.arg("-dMiriDir=miri"); + } if target.ends_with("windows-gnu") { cmd.arg("-dGccDir=rust-mingw"); } @@ -1758,7 +1760,9 @@ impl Step for Extended { candle("CargoGroup.wxs".as_ref()); candle("StdGroup.wxs".as_ref()); candle("ClippyGroup.wxs".as_ref()); - candle("MiriGroup.wxs".as_ref()); + if built_tools.contains("miri") { + candle("MiriGroup.wxs".as_ref()); + } if built_tools.contains("rust-demangler") { candle("RustDemanglerGroup.wxs".as_ref()); } @@ -1794,9 +1798,11 @@ impl Step for Extended { .arg("StdGroup.wixobj") .arg("AnalysisGroup.wixobj") .arg("ClippyGroup.wixobj") - .arg("MiriGroup.wixobj") .current_dir(&exe); + if built_tools.contains("miri") { + cmd.arg("MiriGroup.wixobj"); + } if built_tools.contains("rust-analyzer") { cmd.arg("RustAnalyzerGroup.wixobj"); } diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 7edd3c1204143..791c35c366d87 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -983,6 +983,7 @@ impl Step for RustdocGUI { .arg("doc") .arg("--target-dir") .arg(&out_dir) + .env("RUSTC_BOOTSTRAP", "1") .env("RUSTDOC", builder.rustdoc(self.compiler)) .env("RUSTC", builder.rustc(self.compiler)) .current_dir(path); @@ -1722,6 +1723,8 @@ impl BookTest { let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); let path = builder.src.join(&self.path); + // Books often have feature-gated example text. + rustbook_cmd.env("RUSTC_BOOTSTRAP", "1"); rustbook_cmd.env("PATH", new_path).arg("test").arg(path); builder.add_rust_test_threads(&mut rustbook_cmd); builder.info(&format!("Testing rustbook {}", self.path.display())); diff --git a/src/ci/channel b/src/ci/channel index bf867e0ae5b6c..65b2df87f7df3 100644 --- a/src/ci/channel +++ b/src/ci/channel @@ -1 +1 @@ -nightly +beta diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index b9f787729c148..4e2031a911fb4 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -323,6 +323,21 @@ pub(crate) fn build_impls( for &did in tcx.inherent_impls(did).iter() { build_impl(cx, parent_module, did, attrs, ret); } + + // This pretty much exists expressly for `dyn Error` traits that exist in the `alloc` crate. + // See also: + // + // * https://github.com/rust-lang/rust/issues/103170 — where it didn't used to get documented + // * https://github.com/rust-lang/rust/pull/99917 — where the feature got used + // * https://github.com/rust-lang/rust/issues/53487 — overall tracking issue for Error + if tcx.has_attr(did, sym::rustc_has_incoherent_inherent_impls) { + use rustc_middle::ty::fast_reject::SimplifiedTypeGen::*; + let type_ = + if tcx.is_trait(did) { TraitSimplifiedType(did) } else { AdtSimplifiedType(did) }; + for &did in tcx.incoherent_impls(type_) { + build_impl(cx, parent_module, did, attrs, ret); + } + } } /// `parent_module` refers to the parent of the re-export, not the original item diff --git a/src/test/rustdoc/auxiliary/incoherent-impl-types.rs b/src/test/rustdoc/auxiliary/incoherent-impl-types.rs new file mode 100644 index 0000000000000..fc51e42e5004d --- /dev/null +++ b/src/test/rustdoc/auxiliary/incoherent-impl-types.rs @@ -0,0 +1,7 @@ +#![feature(rustc_attrs)] + +#[rustc_has_incoherent_inherent_impls] +pub trait FooTrait {} + +#[rustc_has_incoherent_inherent_impls] +pub struct FooStruct; diff --git a/src/test/rustdoc/rustc-incoherent-impls.rs b/src/test/rustdoc/rustc-incoherent-impls.rs new file mode 100644 index 0000000000000..3fdefbecc5461 --- /dev/null +++ b/src/test/rustdoc/rustc-incoherent-impls.rs @@ -0,0 +1,28 @@ +// aux-build:incoherent-impl-types.rs +// build-aux-docs + +#![crate_name = "foo"] +#![feature(rustc_attrs)] + +extern crate incoherent_impl_types; + +// The only way this actually shows up is if the type gets inlined. +#[doc(inline)] +pub use incoherent_impl_types::FooTrait; + +// @has foo/trait.FooTrait.html +// @count - '//section[@id="method.do_something"]' 1 +impl dyn FooTrait { + #[rustc_allow_incoherent_impl] + pub fn do_something() {} +} + +#[doc(inline)] +pub use incoherent_impl_types::FooStruct; + +// @has foo/struct.FooStruct.html +// @count - '//section[@id="method.do_something"]' 1 +impl FooStruct { + #[rustc_allow_incoherent_impl] + pub fn do_something() {} +}