From 3ab3c3bca258c4e86ddedf1c33bd8f06f6e2db27 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 6 May 2024 10:54:57 -0700 Subject: [PATCH] Resolve unexpected_cfgs warning warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/lib.rs:210:13 | 210 | #![cfg_attr(error_generic_member_access, feature(error_generic_member_access))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `doc_cfg` --> src/lib.rs:211:13 | 211 | #![cfg_attr(doc_cfg, feature(doc_cfg))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_unsafe_op_in_unsafe_fn_lint` --> src/lib.rs:215:9 | 215 | not(anyhow_no_unsafe_op_in_unsafe_fn_lint), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_unsafe_op_in_unsafe_fn_lint)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_unsafe_op_in_unsafe_fn_lint` --> src/lib.rs:218:13 | 218 | #![cfg_attr(anyhow_no_unsafe_op_in_unsafe_fn_lint, allow(unused_unsafe))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_unsafe_op_in_unsafe_fn_lint)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_nightly_testing` --> src/lib.rs:242:5 | 242 | anyhow_nightly_testing, | ^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_nightly_testing)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/lib.rs:244:9 | 244 | not(error_generic_member_access) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/lib.rs:411:12 | 411 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:1:7 | 1 | #[cfg(std_backtrace)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:4:15 | 4 | #[cfg(all(not(std_backtrace), feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:7:15 | 7 | #[cfg(not(any(std_backtrace, feature = "backtrace")))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:10:7 | 10 | #[cfg(std_backtrace)] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:17:15 | 17 | #[cfg(all(not(std_backtrace), feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:24:11 | 24 | #[cfg(any(std_backtrace, feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:31:15 | 31 | #[cfg(not(any(std_backtrace, feature = "backtrace")))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/backtrace.rs:38:7 | 38 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/backtrace.rs:50:9 | 50 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:51:9 | 51 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:59:32 | 59 | #[cfg(all(feature = "std", not(std_backtrace), not(feature = "backtrace")))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/backtrace.rs:66:15 | 66 | #[cfg(all(not(std_backtrace), feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/context.rs:6:7 | 6 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/context.rs:146:11 | 146 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/context.rs:160:11 | 160 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:3:28 | 3 | #[cfg(any(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:11:11 | 11 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:14:7 | 14 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:558:12 | 558 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:571:12 | 571 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:581:12 | 581 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:664:28 | 664 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:711:7 | 711 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:728:9 | 728 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:729:9 | 729 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:757:28 | 757 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:811:7 | 811 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:852:9 | 852 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:853:9 | 853 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:29:16 | 29 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:376:15 | 376 | #[cfg(any(std_backtrace, feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:403:16 | 403 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `doc_cfg` --> src/error.rs:415:16 | 415 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] | ^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:540:11 | 540 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:550:11 | 550 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:95:19 | 95 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:99:19 | 99 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:103:21 | 103 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:104:21 | 104 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:123:40 | 123 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:127:19 | 127 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:131:21 | 131 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:132:21 | 132 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:152:40 | 152 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:156:19 | 156 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:160:21 | 160 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:161:21 | 161 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:183:19 | 183 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:187:19 | 187 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:191:21 | 191 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:192:21 | 192 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:212:19 | 212 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:216:19 | 216 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:220:21 | 220 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:221:21 | 221 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:328:40 | 328 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:332:19 | 332 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:336:21 | 336 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:337:21 | 337 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:445:23 | 445 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:450:19 | 450 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:529:23 | 529 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:533:19 | 533 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:612:32 | 612 | #[cfg(all(feature = "std", anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:616:11 | 616 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:620:13 | 620 | not(error_generic_member_access), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:621:13 | 621 | any(std_backtrace, feature = "backtrace") | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:653:15 | 653 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:658:11 | 658 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:695:19 | 695 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:703:15 | 703 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/error.rs:925:15 | 925 | #[cfg(any(std_backtrace, feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:942:11 | 942 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:914:19 | 914 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/error.rs:921:15 | 921 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:934:23 | 934 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:936:27 | 936 | #[cfg(not(error_generic_member_access))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/error.rs:964:11 | 964 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `std_backtrace` --> src/fmt.rs:43:19 | 43 | #[cfg(any(std_backtrace, feature = "backtrace"))] | ^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(std_backtrace)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/ptr.rs:94:15 | 94 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/ptr.rs:109:15 | 109 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/ptr.rs:117:15 | 117 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/ptr.rs:151:11 | 151 | #[cfg(anyhow_no_ptr_addr_of)] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_ptr_addr_of` --> src/ptr.rs:166:15 | 166 | #[cfg(not(anyhow_no_ptr_addr_of))] | ^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/wrapper.rs:7:7 | 7 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `error_generic_member_access` --> src/wrapper.rs:80:11 | 80 | #[cfg(error_generic_member_access)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(error_generic_member_access)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_fmt_arguments_as_str` --> src/lib.rs:681:15 | 681 | #[cfg(anyhow_no_fmt_arguments_as_str)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_fmt_arguments_as_str)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition name: `anyhow_no_fmt_arguments_as_str` --> src/lib.rs:683:19 | 683 | #[cfg(not(anyhow_no_fmt_arguments_as_str))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(anyhow_no_fmt_arguments_as_str)");` to the top of the `build.rs` = note: see for more information about checking conditional configuration --- build.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.rs b/build.rs index 2e871ae..0d757e1 100644 --- a/build.rs +++ b/build.rs @@ -65,6 +65,16 @@ fn main() { None => return, }; + if rustc >= 80 { + println!("cargo:rustc-check-cfg=cfg(anyhow_nightly_testing)"); + println!("cargo:rustc-check-cfg=cfg(anyhow_no_fmt_arguments_as_str)"); + println!("cargo:rustc-check-cfg=cfg(anyhow_no_ptr_addr_of)"); + println!("cargo:rustc-check-cfg=cfg(anyhow_no_unsafe_op_in_unsafe_fn_lint)"); + println!("cargo:rustc-check-cfg=cfg(doc_cfg)"); + println!("cargo:rustc-check-cfg=cfg(error_generic_member_access)"); + println!("cargo:rustc-check-cfg=cfg(std_backtrace)"); + } + if rustc < 51 { // core::ptr::addr_of // https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#stabilized-apis