From 34e91ba656f874f44a8a57319548fd9edc6daf56 Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Fri, 6 Sep 2024 00:00:00 +0000 Subject: [PATCH] chore(tls): `lints.rust` expects `cfg(fuzzing)` this fixes an error observed in the nightly toolchain ci action. https://github.com/linkerd/linkerd2-proxy/actions/runs/10728368500/job/29752764638?pr=3177#step:7:165 ``` Error: error: unexpected `cfg` condition name: `fuzzing` --> linkerd/tls/src/server.rs:342:7 | 342 | #[cfg(fuzzing)] | ^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `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`, and `windows` = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(fuzzing)");` to the top of the `build.rs` ``` Signed-off-by: katelyn martin --- linkerd/tls/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linkerd/tls/Cargo.toml b/linkerd/tls/Cargo.toml index 3600ef2c69..47aa73c084 100644 --- a/linkerd/tls/Cargo.toml +++ b/linkerd/tls/Cargo.toml @@ -6,6 +6,9 @@ license = "Apache-2.0" edition = "2021" publish = false +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } + [dependencies] async-trait = "0.1" bytes = "1"