Skip to content

Commit 7f2af2a

Browse files
committed
cleanup to prep for review
1 parent 2b4ffa7 commit 7f2af2a

File tree

5 files changed

+52
-53
lines changed

5 files changed

+52
-53
lines changed

library/alloc/src/boxed.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ mod thin;
192192
#[lang = "owned_box"]
193193
#[fundamental]
194194
#[stable(feature = "rust1", since = "1.0.0")]
195-
// #[rustc_strict_coherence]
196195
// The declaration of the `Box` struct must be kept in sync with the
197196
// `alloc::alloc::box_free` function or ICEs will happen. See the comment
198197
// on `box_free` for more details.

library/alloc/src/collections/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,7 @@ trait SpecExtend<I: IntoIterator> {
152152
/// Extends `self` with the contents of the given iterator.
153153
fn spec_extend(&mut self, iter: I);
154154
}
155+
156+
#[cfg(not(bootstrap))]
157+
#[stable(feature = "try_reserve", since = "1.57.0")]
158+
impl core::error::Error for TryReserveError {}

library/alloc/src/ffi/c_str.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,3 +1121,29 @@ impl CStr {
11211121
CString::from(self)
11221122
}
11231123
}
1124+
1125+
#[cfg(not(bootstrap))]
1126+
#[stable(feature = "rust1", since = "1.0.0")]
1127+
impl core::error::Error for NulError {
1128+
#[allow(deprecated)]
1129+
fn description(&self) -> &str {
1130+
"nul byte found in data"
1131+
}
1132+
}
1133+
1134+
#[cfg(not(bootstrap))]
1135+
#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
1136+
impl core::error::Error for FromVecWithNulError {}
1137+
1138+
#[cfg(not(bootstrap))]
1139+
#[stable(feature = "cstring_into", since = "1.7.0")]
1140+
impl core::error::Error for IntoStringError {
1141+
#[allow(deprecated)]
1142+
fn description(&self) -> &str {
1143+
"C string contained non-utf8 bytes"
1144+
}
1145+
1146+
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
1147+
Some(self.__source())
1148+
}
1149+
}

library/alloc/src/lib.rs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -242,55 +242,3 @@ pub mod vec;
242242
pub mod __export {
243243
pub use core::format_args;
244244
}
245-
246-
#[cfg(not(bootstrap))]
247-
#[stable(feature = "arc_error", since = "1.52.0")]
248-
impl<T: core::error::Error + ?Sized> core::error::Error for crate::sync::Arc<T> {
249-
#[allow(deprecated, deprecated_in_future)]
250-
fn description(&self) -> &str {
251-
core::error::Error::description(&**self)
252-
}
253-
254-
#[allow(deprecated)]
255-
fn cause(&self) -> Option<&dyn core::error::Error> {
256-
core::error::Error::cause(&**self)
257-
}
258-
259-
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
260-
core::error::Error::source(&**self)
261-
}
262-
263-
fn provide<'a>(&'a self, req: &mut core::any::Demand<'a>) {
264-
core::error::Error::provide(&**self, req);
265-
}
266-
}
267-
268-
#[cfg(not(bootstrap))]
269-
#[stable(feature = "try_reserve", since = "1.57.0")]
270-
impl core::error::Error for crate::collections::TryReserveError {}
271-
272-
#[cfg(not(bootstrap))]
273-
#[stable(feature = "rust1", since = "1.0.0")]
274-
impl core::error::Error for crate::ffi::NulError {
275-
#[allow(deprecated)]
276-
fn description(&self) -> &str {
277-
"nul byte found in data"
278-
}
279-
}
280-
281-
#[cfg(not(bootstrap))]
282-
#[stable(feature = "cstring_from_vec_with_nul", since = "1.58.0")]
283-
impl core::error::Error for crate::ffi::FromVecWithNulError {}
284-
285-
#[cfg(not(bootstrap))]
286-
#[stable(feature = "cstring_into", since = "1.7.0")]
287-
impl core::error::Error for crate::ffi::IntoStringError {
288-
#[allow(deprecated)]
289-
fn description(&self) -> &str {
290-
"C string contained non-utf8 bytes"
291-
}
292-
293-
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
294-
Some(self.__source())
295-
}
296-
}

library/alloc/src/sync.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,3 +2763,25 @@ fn data_offset_align(align: usize) -> usize {
27632763
let layout = Layout::new::<ArcInner<()>>();
27642764
layout.size() + layout.padding_needed_for(align)
27652765
}
2766+
2767+
#[cfg(not(bootstrap))]
2768+
#[stable(feature = "arc_error", since = "1.52.0")]
2769+
impl<T: core::error::Error + ?Sized> core::error::Error for Arc<T> {
2770+
#[allow(deprecated, deprecated_in_future)]
2771+
fn description(&self) -> &str {
2772+
core::error::Error::description(&**self)
2773+
}
2774+
2775+
#[allow(deprecated)]
2776+
fn cause(&self) -> Option<&dyn core::error::Error> {
2777+
core::error::Error::cause(&**self)
2778+
}
2779+
2780+
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
2781+
core::error::Error::source(&**self)
2782+
}
2783+
2784+
fn provide<'a>(&'a self, req: &mut core::any::Demand<'a>) {
2785+
core::error::Error::provide(&**self, req);
2786+
}
2787+
}

0 commit comments

Comments
 (0)