|
111 | 111 | #![feature(const_pin)]
|
112 | 112 | #![feature(cstr_from_bytes_until_nul)]
|
113 | 113 | #![feature(dispatch_from_dyn)]
|
| 114 | +#![cfg_attr(not(bootstrap), feature(error_generic_member_access))] |
114 | 115 | #![cfg_attr(not(bootstrap), feature(error_in_core))]
|
115 | 116 | #![feature(exact_size_is_empty)]
|
116 | 117 | #![feature(extend_one)]
|
|
128 | 129 | #![feature(nonnull_slice_from_raw_parts)]
|
129 | 130 | #![feature(pattern)]
|
130 | 131 | #![feature(pointer_byte_offsets)]
|
| 132 | +#![cfg_attr(not(bootstrap), feature(provide_any))] |
131 | 133 | #![feature(ptr_internals)]
|
132 | 134 | #![feature(ptr_metadata)]
|
133 | 135 | #![feature(ptr_sub_ptr)]
|
@@ -240,3 +242,55 @@ pub mod vec;
|
240 | 242 | pub mod __export {
|
241 | 243 | pub use core::format_args;
|
242 | 244 | }
|
| 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 | +} |
0 commit comments