Skip to content

Commit af2ed1b

Browse files
committed
Auto merge of #85482 - scottmcm:more-try-bootstrap, r=yaahc
`#[cfg(bootstrap)]` out `NoneError` and other v1 try_trait stuff Closes #46871 r? `@yaahc`
2 parents fc81ad2 + 58a85d5 commit af2ed1b

File tree

6 files changed

+8
-1
lines changed

6 files changed

+8
-1
lines changed

library/core/src/ops/control_flow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub enum ControlFlow<B, C = ()> {
6363
}
6464

6565
#[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")]
66+
#[cfg(bootstrap)]
6667
impl<B, C> ops::TryV1 for ControlFlow<B, C> {
6768
type Output = C;
6869
type Error = B;

library/core/src/ops/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ mod function;
147147
mod generator;
148148
mod index;
149149
mod range;
150+
#[cfg(bootstrap)]
150151
mod r#try;
151152
mod try_trait;
152153
mod unsize;
@@ -187,6 +188,7 @@ pub use self::range::{Bound, RangeBounds, RangeInclusive, RangeToInclusive};
187188
pub use self::r#try::Try;
188189

189190
#[unstable(feature = "try_trait_transition", reason = "for bootstrap", issue = "none")]
191+
#[cfg(bootstrap)]
190192
pub(crate) use self::r#try::Try as TryV1;
191193

192194
#[unstable(feature = "try_trait_v2", issue = "84277")]

library/core/src/option.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1641,9 +1641,11 @@ impl<A, V: FromIterator<A>> FromIterator<Option<A>> for Option<V> {
16411641
#[rustc_diagnostic_item = "none_error"]
16421642
#[unstable(feature = "try_trait", issue = "42327")]
16431643
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
1644+
#[cfg(bootstrap)]
16441645
pub struct NoneError;
16451646

16461647
#[unstable(feature = "try_trait", issue = "42327")]
1648+
#[cfg(bootstrap)]
16471649
impl<T> ops::TryV1 for Option<T> {
16481650
type Output = T;
16491651
type Error = NoneError;

library/core/src/result.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,7 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
16271627
}
16281628

16291629
#[unstable(feature = "try_trait", issue = "42327")]
1630+
#[cfg(bootstrap)]
16301631
impl<T, E> ops::TryV1 for Result<T, E> {
16311632
type Output = T;
16321633
type Error = E;

library/core/src/task/poll.rs

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl<T> From<T> for Poll<T> {
129129
}
130130

131131
#[stable(feature = "futures_api", since = "1.36.0")]
132+
#[cfg(bootstrap)]
132133
impl<T, E> ops::TryV1 for Poll<Result<T, E>> {
133134
type Output = Poll<T>;
134135
type Error = E;
@@ -184,6 +185,7 @@ impl<T, E, F: From<E>> ops::FromResidual<Result<convert::Infallible, E>> for Pol
184185
}
185186

186187
#[stable(feature = "futures_api", since = "1.36.0")]
188+
#[cfg(bootstrap)]
187189
impl<T, E> ops::TryV1 for Poll<Option<Result<T, E>>> {
188190
type Output = Poll<Option<T>>;
189191
type Error = E;

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#![feature(str_internals)]
4545
#![feature(test)]
4646
#![feature(trusted_len)]
47-
#![feature(try_trait)]
4847
#![feature(try_trait_v2)]
4948
#![feature(slice_internals)]
5049
#![feature(slice_partition_dedup)]

0 commit comments

Comments
 (0)