From ada65c2aad095ca13ac4b353100083c324356512 Mon Sep 17 00:00:00 2001 From: Jane Losare-Lusby Date: Thu, 11 Aug 2022 18:37:08 +0000 Subject: [PATCH] fix broken tests --- library/alloc/src/boxed.rs | 11 ++++++++++- library/core/src/num/mod.rs | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index d8776055e9d3d..346df21383650 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -171,12 +171,13 @@ use core::task::{Context, Poll}; #[cfg(not(no_global_oom_handling))] use crate::alloc::{handle_alloc_error, WriteCloneIntoRaw}; use crate::alloc::{AllocError, Allocator, Global, Layout}; -#[cfg(any(not(no_global_oom_handling), not(bootstrap)))] +#[cfg(not(no_global_oom_handling))] use crate::borrow::Cow; use crate::raw_vec::RawVec; #[cfg(not(no_global_oom_handling))] use crate::str::from_boxed_utf8_unchecked; #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] use crate::string::String; #[cfg(not(no_global_oom_handling))] use crate::vec::Vec; @@ -2139,6 +2140,7 @@ impl dyn Error + Send + Sync { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, E: Error + 'a> From for Box { /// Converts a type of [`Error`] into a box of dyn [`Error`]. @@ -2172,6 +2174,7 @@ impl<'a, E: Error + 'a> From for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, E: Error + Send + Sync + 'a> From for Box { /// Converts a type of [`Error`] + [`Send`] + [`Sync`] into a box of @@ -2211,6 +2214,7 @@ impl<'a, E: Error + Send + Sync + 'a> From for Box for Box { /// Converts a [`String`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. @@ -2255,6 +2259,7 @@ impl From for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "string_box_error", since = "1.6.0")] impl From for Box { /// Converts a [`String`] into a box of dyn [`Error`]. @@ -2277,6 +2282,7 @@ impl From for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a> From<&str> for Box { /// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. @@ -2301,6 +2307,7 @@ impl<'a> From<&str> for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "string_box_error", since = "1.6.0")] impl From<&str> for Box { /// Converts a [`str`] into a box of dyn [`Error`]. @@ -2323,6 +2330,7 @@ impl From<&str> for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "cow_box_error", since = "1.22.0")] impl<'a, 'b> From> for Box { /// Converts a [`Cow`] into a box of dyn [`Error`] + [`Send`] + [`Sync`]. @@ -2345,6 +2353,7 @@ impl<'a, 'b> From> for Box { } #[cfg(not(bootstrap))] +#[cfg(not(no_global_oom_handling))] #[stable(feature = "cow_box_error", since = "1.22.0")] impl<'a> From> for Box { /// Converts a [`Cow`] into a box of dyn [`Error`]. diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index ed322ade6ebb2..8f5e39dc29522 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -60,6 +60,7 @@ pub use wrapping::Wrapping; pub use dec2flt::ParseFloatError; #[cfg(not(bootstrap))] +#[cfg(not(no_fp_fmt_parse))] #[stable(feature = "rust1", since = "1.0.0")] impl Error for ParseFloatError { #[allow(deprecated)]