Skip to content
Myr

Remove support for compilers without core UnwindSafe

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 0df956b · Browse files · 2 files+0 added−13 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+0 added−13 removed

  • other:+0 added−13 removed

2 files+0 added−13 removed

modified:src/error.rs-6 removed
10 unmodified lines
11use core::fmt::{self, Debug, Display};12use core::mem::ManuallyDrop;13#[cfg(any(feature = "std", not(anyhow_no_core_error)))]14use core::ops::{Deref, DerefMut};15#[cfg(not(anyhow_no_core_unwind_safe))]15use core::panic::{RefUnwindSafe, UnwindSafe};16use core::ptr;17use core::ptr::NonNull;19#[cfg(all(feature = "std", anyhow_no_core_unwind_safe))]20use std::panic::{RefUnwindSafe, UnwindSafe};1819impl Error {20 /// Create a new error object from any error type.21 ///
1059 unmodified lines
1081 &**self1082 }1083}10841088#[cfg(any(feature = "std", not(anyhow_no_core_unwind_safe)))]1085impl UnwindSafe for Error {}10901091#[cfg(any(feature = "std", not(anyhow_no_core_unwind_safe)))]1086impl RefUnwindSafe for Error {}
modified:build.rs-7 removed
70 unmodified lines
71 println!("cargo:rustc-check-cfg=cfg(anyhow_build_probe)");72 println!("cargo:rustc-check-cfg=cfg(anyhow_nightly_testing)");73 println!("cargo:rustc-check-cfg=cfg(anyhow_no_clippy_format_args)");74 println!("cargo:rustc-check-cfg=cfg(anyhow_no_core_error)");75 println!("cargo:rustc-check-cfg=cfg(anyhow_no_core_unwind_safe)");75 println!("cargo:rustc-check-cfg=cfg(error_generic_member_access)");76 println!("cargo:rustc-check-cfg=cfg(std_backtrace)");77 }7880 if rustc < 56 {81 // core::panic::{UnwindSafe, RefUnwindSafe}82 // https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html#stabilized-apis83 println!("cargo:rustc-cfg=anyhow_no_core_unwind_safe");84 }8579 if !error_generic_member_access && cfg!(feature = "std") && rustc >= 65 {80 // std::backtrace::Backtrace81 // https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html#stabilized-apis82 println!("cargo:rustc-cfg=std_backtrace");
124 unmodified lines