Skip to content
Myr

Remove support for compilers without unsafe_op_in_unsafe_fn

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 69c1ea2 · Browse files · 2 files+1 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+1 added−13 removed

  • other:+1 added−13 removed

2 files+1 added−13 removed

modified:src/lib.rs+1 added-6 removed
207 unmodified lines
208209#![doc(html_root_url = "https://docs.rs/anyhow/1.0.100")]210#![cfg_attr(error_generic_member_access, feature(error_generic_member_access))]211#![no_std]212#![deny(dead_code, unused_imports, unused_mut)]213#![cfg_attr(214 not(anyhow_no_unsafe_op_in_unsafe_fn_lint),215 deny(unsafe_op_in_unsafe_fn)216)]217#![cfg_attr(anyhow_no_unsafe_op_in_unsafe_fn_lint, allow(unused_unsafe))]212#![deny(dead_code, unsafe_op_in_unsafe_fn, unused_imports, unused_mut)]213#![allow(214 clippy::doc_markdown,215 clippy::elidable_lifetime_names,216 clippy::enum_glob_use,
510 unmodified lines
modified:build.rs-7 removed
71 unmodified lines
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)");76 println!("cargo:rustc-check-cfg=cfg(anyhow_no_unsafe_op_in_unsafe_fn_lint)");76 println!("cargo:rustc-check-cfg=cfg(error_generic_member_access)");77 println!("cargo:rustc-check-cfg=cfg(std_backtrace)");78 }7981 if rustc < 52 {82 // #![deny(unsafe_op_in_unsafe_fn)]83 // https://github.com/rust-lang/rust/issues/7166884 println!("cargo:rustc-cfg=anyhow_no_unsafe_op_in_unsafe_fn_lint");85 }8680 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");
130 unmodified lines