Skip to content
Myr

Merge pull request #363 from dtolnay/checkcfg

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

Resolve unexpected_cfgs warning

authored by David Tolnay · committed by GitHub · parents 8e62244, 3ab3c3b · Browse files · 1 file+10 added−0 removed
This commit

State

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

Diff stats

1 file+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:build.rs+10 added
63 unmodified lines
64 Some(rustc) => rustc,65 None => return,66 };6768 if rustc >= 80 {69 println!("cargo:rustc-check-cfg=cfg(anyhow_nightly_testing)");70 println!("cargo:rustc-check-cfg=cfg(anyhow_no_fmt_arguments_as_str)");71 println!("cargo:rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");72 println!("cargo:rustc-check-cfg=cfg(anyhow_no_unsafe_op_in_unsafe_fn_lint)");73 println!("cargo:rustc-check-cfg=cfg(doc_cfg)");74 println!("cargo:rustc-check-cfg=cfg(error_generic_member_access)");75 println!("cargo:rustc-check-cfg=cfg(std_backtrace)");76 }7778 if rustc < 51 {79 // core::ptr::addr_of80 // https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#stabilized-apis81 println!("cargo:rustc-cfg=anyhow_no_ptr_addr_of");
98 unmodified lines