diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs index 904a53bb4acc7..4c3ab4ac86955 100644 --- a/library/alloc/src/borrow.rs +++ b/library/alloc/src/borrow.rs @@ -182,11 +182,11 @@ where B: ToOwned, { /// Borrowed data. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Borrowed(#[stable(feature = "rust1", since = "1.0.0")] &'a B), /// Owned data. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Owned(#[stable(feature = "rust1", since = "1.0.0")] ::Owned), } diff --git a/library/alloc/src/collections/btree/map/entry.rs b/library/alloc/src/collections/btree/map/entry.rs index b6eecf9b0e952..8826743e23075 100644 --- a/library/alloc/src/collections/btree/map/entry.rs +++ b/library/alloc/src/collections/btree/map/entry.rs @@ -24,11 +24,11 @@ pub enum Entry< #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global, > { /// A vacant entry. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Vacant(#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V, A>), /// An occupied entry. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Occupied(#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V, A>), } diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 20bb67687848f..764deec1489e0 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -340,13 +340,13 @@ pub struct AssertParamIsEq { #[repr(i8)] pub enum Ordering { /// An ordering where a compared value is less than another. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Less = -1, /// An ordering where a compared value is equal to another. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Equal = 0, /// An ordering where a compared value is greater than another. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Greater = 1, } diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 9d3e9abf55779..7bdd0f519b6b1 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -24,13 +24,13 @@ mod num; /// Possible alignments returned by `Formatter::align` #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Alignment { - #[stable(feature = "fmt_flags_align", since = "1.28.0")] + #[cfg_attr(bootstrap, stable(feature = "fmt_flags_align", since = "1.28.0"))] /// Indication that contents should be left-aligned. Left, - #[stable(feature = "fmt_flags_align", since = "1.28.0")] + #[cfg_attr(bootstrap, stable(feature = "fmt_flags_align", since = "1.28.0"))] /// Indication that contents should be right-aligned. Right, - #[stable(feature = "fmt_flags_align", since = "1.28.0")] + #[cfg_attr(bootstrap, stable(feature = "fmt_flags_align", since = "1.28.0"))] /// Indication that contents should be center-aligned. Center, } diff --git a/library/core/src/num/error.rs b/library/core/src/num/error.rs index 1a223016dae0f..106930eb54fee 100644 --- a/library/core/src/num/error.rs +++ b/library/core/src/num/error.rs @@ -88,7 +88,7 @@ pub enum IntErrorKind { /// Value being parsed is empty. /// /// This variant will be constructed when parsing an empty string. - #[stable(feature = "int_error_matching", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "int_error_matching", since = "1.55.0"))] Empty, /// Contains an invalid digit in its context. /// @@ -97,19 +97,19 @@ pub enum IntErrorKind { /// /// This variant is also constructed when a `+` or `-` is misplaced within a string /// either on its own or in the middle of a number. - #[stable(feature = "int_error_matching", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "int_error_matching", since = "1.55.0"))] InvalidDigit, /// Integer is too large to store in target integer type. - #[stable(feature = "int_error_matching", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "int_error_matching", since = "1.55.0"))] PosOverflow, /// Integer is too small to store in target integer type. - #[stable(feature = "int_error_matching", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "int_error_matching", since = "1.55.0"))] NegOverflow, /// Value was Zero /// /// This variant will be emitted when the parsing string has a value of zero, which /// would be illegal for non-zero types. - #[stable(feature = "int_error_matching", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "int_error_matching", since = "1.55.0"))] Zero, } diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index f481399fdcf92..73a2b746f8719 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -946,18 +946,18 @@ pub enum FpCategory { /// /// See [the documentation for `f32`](f32) for more information on the unusual properties /// of NaN. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Nan, /// Positive or negative infinity, which often results from dividing a nonzero number /// by zero. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Infinite, /// Positive or negative zero. /// /// See [the documentation for `f32`](f32) for more information on the signedness of zeroes. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Zero, /// “Subnormal” or “denormal” floating point representation (less precise, relative to @@ -968,7 +968,7 @@ pub enum FpCategory { /// /// [`Normal`]: Self::Normal /// [`Zero`]: Self::Zero - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Subnormal, /// A regular floating point number, not any of the exceptional categories. @@ -977,7 +977,7 @@ pub enum FpCategory { /// and the largest positive normal numbers are [`f32::MAX`] and [`f64::MAX`]. (Unlike signed /// integers, floating point numbers are symmetric in their range, so negating any of these /// constants will produce their negative counterpart.) - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Normal, } diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index b1f5559dcfc17..918787780ef7e 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -82,11 +82,11 @@ use crate::{convert, ops}; #[derive(Debug, Clone, Copy, PartialEq)] pub enum ControlFlow { /// Move on to the next phase of the operation as normal. - #[stable(feature = "control_flow_enum_type", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "control_flow_enum_type", since = "1.55.0"))] #[lang = "Continue"] Continue(C), /// Exit the operation without running subsequent phases. - #[stable(feature = "control_flow_enum_type", since = "1.55.0")] + #[cfg_attr(bootstrap, stable(feature = "control_flow_enum_type", since = "1.55.0"))] #[lang = "Break"] Break(B), // Yes, the order of the variants doesn't match the type parameters. diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index a3b14847342cb..3428362d3834e 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -664,13 +664,13 @@ impl> RangeToInclusive { #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)] pub enum Bound { /// An inclusive bound. - #[stable(feature = "collections_bound", since = "1.17.0")] + #[cfg_attr(bootstrap, stable(feature = "collections_bound", since = "1.17.0"))] Included(#[stable(feature = "collections_bound", since = "1.17.0")] T), /// An exclusive bound. - #[stable(feature = "collections_bound", since = "1.17.0")] + #[cfg_attr(bootstrap, stable(feature = "collections_bound", since = "1.17.0"))] Excluded(#[stable(feature = "collections_bound", since = "1.17.0")] T), /// An infinite endpoint. Indicates that there is no bound in this direction. - #[stable(feature = "collections_bound", since = "1.17.0")] + #[cfg_attr(bootstrap, stable(feature = "collections_bound", since = "1.17.0"))] Unbounded, } diff --git a/library/core/src/option.rs b/library/core/src/option.rs index bca73cb770fbb..2e025051118c5 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -518,11 +518,11 @@ use crate::{ pub enum Option { /// No value. #[lang = "None"] - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] None, /// Some value of type `T`. #[lang = "Some"] - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Some(#[stable(feature = "rust1", since = "1.0.0")] T), } diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 45b052c824d31..2b4d3cc184a16 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -504,12 +504,12 @@ use crate::{convert, fmt, hint}; pub enum Result { /// Contains the success value #[lang = "Ok"] - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Ok(#[stable(feature = "rust1", since = "1.0.0")] T), /// Contains the error value #[lang = "Err"] - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Err(#[stable(feature = "rust1", since = "1.0.0")] E), } diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 40ca9abd6bdc9..a0375882494c3 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -218,7 +218,7 @@ pub enum Ordering { /// Corresponds to [`memory_order_relaxed`] in C++20. /// /// [`memory_order_relaxed`]: https://en.cppreference.com/w/cpp/atomic/memory_order#Relaxed_ordering - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Relaxed, /// When coupled with a store, all previous operations become ordered /// before any load of this value with [`Acquire`] (or stronger) ordering. @@ -233,7 +233,7 @@ pub enum Ordering { /// Corresponds to [`memory_order_release`] in C++20. /// /// [`memory_order_release`]: https://en.cppreference.com/w/cpp/atomic/memory_order#Release-Acquire_ordering - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Release, /// When coupled with a load, if the loaded value was written by a store operation with /// [`Release`] (or stronger) ordering, then all subsequent operations @@ -248,7 +248,7 @@ pub enum Ordering { /// Corresponds to [`memory_order_acquire`] in C++20. /// /// [`memory_order_acquire`]: https://en.cppreference.com/w/cpp/atomic/memory_order#Release-Acquire_ordering - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Acquire, /// Has the effects of both [`Acquire`] and [`Release`] together: /// For loads it uses [`Acquire`] ordering. For stores it uses the [`Release`] ordering. @@ -262,7 +262,7 @@ pub enum Ordering { /// Corresponds to [`memory_order_acq_rel`] in C++20. /// /// [`memory_order_acq_rel`]: https://en.cppreference.com/w/cpp/atomic/memory_order#Release-Acquire_ordering - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] AcqRel, /// Like [`Acquire`]/[`Release`]/[`AcqRel`] (for load, store, and load-with-store /// operations, respectively) with the additional guarantee that all threads see all @@ -271,7 +271,7 @@ pub enum Ordering { /// Corresponds to [`memory_order_seq_cst`] in C++20. /// /// [`memory_order_seq_cst`]: https://en.cppreference.com/w/cpp/atomic/memory_order#Sequentially-consistent_ordering - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] SeqCst, } diff --git a/library/core/src/task/poll.rs b/library/core/src/task/poll.rs index 41f0a25dbc3e0..4f3cbc7efd9bd 100644 --- a/library/core/src/task/poll.rs +++ b/library/core/src/task/poll.rs @@ -13,7 +13,7 @@ use crate::task::Ready; pub enum Poll { /// Represents that a value is immediately ready. #[lang = "Ready"] - #[stable(feature = "futures_api", since = "1.36.0")] + #[cfg_attr(bootstrap, stable(feature = "futures_api", since = "1.36.0"))] Ready(#[stable(feature = "futures_api", since = "1.36.0")] T), /// Represents that a value is not ready yet. @@ -22,7 +22,7 @@ pub enum Poll { /// ensure that the current task is scheduled to be awoken when /// progress can be made. #[lang = "Pending"] - #[stable(feature = "futures_api", since = "1.36.0")] + #[cfg_attr(bootstrap, stable(feature = "futures_api", since = "1.36.0"))] Pending, } diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs index 5cf6ec8178928..bd1a4c966348b 100644 --- a/library/std/src/backtrace.rs +++ b/library/std/src/backtrace.rs @@ -118,15 +118,15 @@ pub struct Backtrace { pub enum BacktraceStatus { /// Capturing a backtrace is not supported, likely because it's not /// implemented for the current platform. - #[stable(feature = "backtrace", since = "1.65.0")] + #[cfg_attr(bootstrap, stable(feature = "backtrace", since = "1.65.0"))] Unsupported, /// Capturing a backtrace has been disabled through either the /// `RUST_LIB_BACKTRACE` or `RUST_BACKTRACE` environment variables. - #[stable(feature = "backtrace", since = "1.65.0")] + #[cfg_attr(bootstrap, stable(feature = "backtrace", since = "1.65.0"))] Disabled, /// A backtrace has been captured and the `Backtrace` should print /// reasonable information when rendered. - #[stable(feature = "backtrace", since = "1.65.0")] + #[cfg_attr(bootstrap, stable(feature = "backtrace", since = "1.65.0"))] Captured, } diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index db811343fa322..d55f0d32605f1 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -2074,11 +2074,11 @@ impl Debug for RawEntryBuilder<'_, K, V, S> { #[cfg_attr(not(test), rustc_diagnostic_item = "HashMapEntry")] pub enum Entry<'a, K: 'a, V: 'a> { /// An occupied entry. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Occupied(#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>), /// A vacant entry. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Vacant(#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>), } diff --git a/library/std/src/env.rs b/library/std/src/env.rs index 463f714064c61..68536d639a3e7 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -282,13 +282,13 @@ fn _var_os(key: &OsStr) -> Option { pub enum VarError { /// The specified environment variable was not present in the current /// process's environment. - #[stable(feature = "env", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "env", since = "1.0.0"))] NotPresent, /// The specified environment variable was found, but it did not contain /// valid unicode data. The found data is returned as a payload of this /// variant. - #[stable(feature = "env", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "env", since = "1.0.0"))] NotUnicode(#[stable(feature = "env", since = "1.0.0")] OsString), } diff --git a/library/std/src/io/error.rs b/library/std/src/io/error.rs index ff7fdcae16f53..a637e3e977754 100644 --- a/library/std/src/io/error.rs +++ b/library/std/src/io/error.rs @@ -160,16 +160,16 @@ struct Custom { #[non_exhaustive] pub enum ErrorKind { /// An entity was not found, often a file. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] NotFound, /// The operation lacked the necessary privileges to complete. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] PermissionDenied, /// The connection was refused by the remote server. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] ConnectionRefused, /// The connection was reset by the remote server. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] ConnectionReset, /// The remote host is not reachable. #[unstable(feature = "io_error_more", issue = "86442")] @@ -178,31 +178,31 @@ pub enum ErrorKind { #[unstable(feature = "io_error_more", issue = "86442")] NetworkUnreachable, /// The connection was aborted (terminated) by the remote server. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] ConnectionAborted, /// The network operation failed because it was not connected yet. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] NotConnected, /// A socket address could not be bound because the address is already in /// use elsewhere. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] AddrInUse, /// A nonexistent interface was requested or the requested address was not /// local. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] AddrNotAvailable, /// The system's networking is down. #[unstable(feature = "io_error_more", issue = "86442")] NetworkDown, /// The operation failed because a pipe was closed. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] BrokenPipe, /// An entity already exists, often a file. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] AlreadyExists, /// The operation needs to block to complete, but the blocking operation was /// requested to not occur. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] WouldBlock, /// A filesystem object is, unexpectedly, not a directory. /// @@ -237,7 +237,7 @@ pub enum ErrorKind { #[unstable(feature = "io_error_more", issue = "86442")] StaleNetworkFileHandle, /// A parameter was incorrect. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] InvalidInput, /// Data not valid for the operation were encountered. /// @@ -252,7 +252,7 @@ pub enum ErrorKind { #[stable(feature = "io_invalid_data", since = "1.2.0")] InvalidData, /// The I/O operation's timeout expired, causing it to be canceled. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] TimedOut, /// An error returned when an operation could not be completed because a /// call to [`write`] returned [`Ok(0)`]. @@ -263,7 +263,7 @@ pub enum ErrorKind { /// /// [`write`]: crate::io::Write::write /// [`Ok(0)`]: Ok - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] WriteZero, /// The underlying storage (typically, a filesystem) is full. /// @@ -323,7 +323,7 @@ pub enum ErrorKind { /// This operation was interrupted. /// /// Interrupted operations can typically be retried. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Interrupted, /// This operation is unsupported on this platform. @@ -363,7 +363,7 @@ pub enum ErrorKind { /// Errors from the standard library that do not fall under any of the I/O /// error kinds cannot be `match`ed on, and will only match a wildcard (`_`) pattern. /// New [`ErrorKind`]s might be added in the future for some of those. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Other, /// Any I/O error from the standard library that's not part of this list. diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 96addbd1a0558..63f3a4bea5657 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -1875,7 +1875,7 @@ pub trait Seek { #[stable(feature = "rust1", since = "1.0.0")] pub enum SeekFrom { /// Sets the offset to the provided number of bytes. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Start(#[stable(feature = "rust1", since = "1.0.0")] u64), /// Sets the offset to the size of this object plus the specified number of @@ -1883,7 +1883,7 @@ pub enum SeekFrom { /// /// It is possible to seek beyond the end of an object, but it's an error to /// seek before byte 0. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] End(#[stable(feature = "rust1", since = "1.0.0")] i64), /// Sets the offset to the current position plus the specified number of @@ -1891,7 +1891,7 @@ pub enum SeekFrom { /// /// It is possible to seek beyond the end of an object, but it's an error to /// seek before byte 0. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Current(#[stable(feature = "rust1", since = "1.0.0")] i64), } diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 53fee952a7a7a..98724b88dad0a 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -41,10 +41,10 @@ use crate::vec; #[stable(feature = "rust1", since = "1.0.0")] pub enum SocketAddr { /// An IPv4 socket address. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] V4(#[stable(feature = "rust1", since = "1.0.0")] SocketAddrV4), /// An IPv6 socket address. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] V6(#[stable(feature = "rust1", since = "1.0.0")] SocketAddrV6), } diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index 41ca9ba842588..f1950d3202b09 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -32,10 +32,10 @@ use crate::sys_common::{FromInner, IntoInner}; #[derive(Copy, Clone, Eq, PartialEq, Hash, PartialOrd, Ord)] pub enum IpAddr { /// An IPv4 address. - #[stable(feature = "ip_addr", since = "1.7.0")] + #[cfg_attr(bootstrap, stable(feature = "ip_addr", since = "1.7.0"))] V4(#[stable(feature = "ip_addr", since = "1.7.0")] Ipv4Addr), /// An IPv6 address. - #[stable(feature = "ip_addr", since = "1.7.0")] + #[cfg_attr(bootstrap, stable(feature = "ip_addr", since = "1.7.0"))] V6(#[stable(feature = "ip_addr", since = "1.7.0")] Ipv6Addr), } diff --git a/library/std/src/net/mod.rs b/library/std/src/net/mod.rs index e7a40bdaf8e99..623072199fcab 100644 --- a/library/std/src/net/mod.rs +++ b/library/std/src/net/mod.rs @@ -53,19 +53,19 @@ pub enum Shutdown { /// All currently blocked and future [reads] will return [Ok]\(0). /// /// [reads]: crate::io::Read "io::Read" - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Read, /// The writing portion of the [`TcpStream`] should be shut down. /// /// All currently blocked and future [writes] will return an error. /// /// [writes]: crate::io::Write "io::Write" - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Write, /// Both the reading and the writing portions of the [`TcpStream`] should be shut down. /// /// See [`Shutdown::Read`] and [`Shutdown::Write`] for more information. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Both, } diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 5dfeb517a1996..1ce2e038f29ae 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -145,7 +145,7 @@ pub enum Prefix<'a> { /// /// Verbatim prefixes consist of `\\?\` immediately followed by the given /// component. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Verbatim(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), /// Verbatim prefix using Windows' _**U**niform **N**aming **C**onvention_, @@ -153,7 +153,7 @@ pub enum Prefix<'a> { /// /// Verbatim UNC prefixes consist of `\\?\UNC\` immediately followed by the /// server's hostname and a share name. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] VerbatimUNC( #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, @@ -163,28 +163,28 @@ pub enum Prefix<'a> { /// /// Verbatim disk prefixes consist of `\\?\` immediately followed by the /// drive letter and `:`. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] VerbatimDisk(#[stable(feature = "rust1", since = "1.0.0")] u8), /// Device namespace prefix, e.g., `\\.\COM42`. /// /// Device namespace prefixes consist of `\\.\` (possibly using `/` /// instead of `\`), immediately followed by the device name. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] DeviceNS(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), /// Prefix using Windows' _**U**niform **N**aming **C**onvention_, e.g. /// `\\server\share`. /// /// UNC prefixes consist of the server's hostname and a share name. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] UNC( #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, #[stable(feature = "rust1", since = "1.0.0")] &'a OsStr, ), /// Prefix `C:` for the given disk drive. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Disk(#[stable(feature = "rust1", since = "1.0.0")] u8), } @@ -511,28 +511,28 @@ pub enum Component<'a> { /// for more. /// /// Does not occur on Unix. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Prefix(#[stable(feature = "rust1", since = "1.0.0")] PrefixComponent<'a>), /// The root directory component, appears after any prefix and before anything else. /// /// It represents a separator that designates that a path starts from root. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] RootDir, /// A reference to the current directory, i.e., `.`. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] CurDir, /// A reference to the parent directory, i.e., `..`. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] ParentDir, /// A normal component, e.g., `a` and `b` in `a/b`. /// /// This variant is the most common one, it represents references to files /// or directories. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Normal(#[stable(feature = "rust1", since = "1.0.0")] &'a OsStr), } diff --git a/library/std/src/sync/mpsc/mod.rs b/library/std/src/sync/mpsc/mod.rs index e85a872396518..253ab31fee9fe 100644 --- a/library/std/src/sync/mpsc/mod.rs +++ b/library/std/src/sync/mpsc/mod.rs @@ -594,12 +594,12 @@ pub struct RecvError; pub enum TryRecvError { /// This **channel** is currently empty, but the **Sender**(s) have not yet /// disconnected, so data may yet become available. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Empty, /// The **channel**'s sending half has become disconnected, and there will /// never be any more data received on it. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Disconnected, } @@ -613,11 +613,11 @@ pub enum TryRecvError { pub enum RecvTimeoutError { /// This **channel** is currently empty, but the **Sender**(s) have not yet /// disconnected, so data may yet become available. - #[stable(feature = "mpsc_recv_timeout", since = "1.12.0")] + #[cfg_attr(bootstrap, stable(feature = "mpsc_recv_timeout", since = "1.12.0"))] Timeout, /// The **channel**'s sending half has become disconnected, and there will /// never be any more data received on it. - #[stable(feature = "mpsc_recv_timeout", since = "1.12.0")] + #[cfg_attr(bootstrap, stable(feature = "mpsc_recv_timeout", since = "1.12.0"))] Disconnected, } @@ -634,12 +634,12 @@ pub enum TrySendError { /// If this is a buffered channel, then the buffer is full at this time. If /// this is not a buffered channel, then there is no [`Receiver`] available to /// acquire the data. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Full(#[stable(feature = "rust1", since = "1.0.0")] T), /// This [`sync_channel`]'s receiving half has disconnected, so the data could not be /// sent. The data is returned back to the callee in this case. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Disconnected(#[stable(feature = "rust1", since = "1.0.0")] T), } diff --git a/library/std/src/sync/poison.rs b/library/std/src/sync/poison.rs index 741312d5537e9..15ce3394fcb6e 100644 --- a/library/std/src/sync/poison.rs +++ b/library/std/src/sync/poison.rs @@ -110,11 +110,11 @@ pub struct PoisonError { pub enum TryLockError { /// The lock could not be acquired because another thread failed while holding /// the lock. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] Poisoned(#[stable(feature = "rust1", since = "1.0.0")] PoisonError), /// The lock could not be acquired at this time because the operation would /// otherwise block. - #[stable(feature = "rust1", since = "1.0.0")] + #[cfg_attr(bootstrap, stable(feature = "rust1", since = "1.0.0"))] WouldBlock, }