diff --git a/libs/pavex/Cargo.toml b/libs/pavex/Cargo.toml index f90713836..44c24f77a 100644 --- a/libs/pavex/Cargo.toml +++ b/libs/pavex/Cargo.toml @@ -9,6 +9,9 @@ repository.workspace = true license.workspace = true readme = "README.md" +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(pavex_ide_hint)'] } + [features] default = ["server", "server_request_id", "time", "cookie"] diff --git a/libs/pavex_test_runner/src/lib.rs b/libs/pavex_test_runner/src/lib.rs index cf5f2c329..be8a6604d 100644 --- a/libs/pavex_test_runner/src/lib.rs +++ b/libs/pavex_test_runner/src/lib.rs @@ -256,6 +256,9 @@ impl TestData { version = "0.1.0" edition = "2021" + [lints.rust] + unexpected_cfgs = { level = "allow", check-cfg = ["cfg(pavex_ide_hint)"] } + [dependencies] pavex ={ path = "../../../../../../libs/pavex" } }; @@ -355,6 +358,9 @@ impl TestData { version = "0.1.0" edition = "2021" + [lints.rust] + unexpected_cfgs = { level = "allow", check-cfg = ["cfg(pavex_ide_hint)"] } + [dependencies] pavex ={ path = "../../../../../libs/pavex" } pavex_cli_client = { path = "../../../../../libs/pavex_cli_client" } diff --git a/libs/pavexc_cli/template/app/Cargo.toml.liquid b/libs/pavexc_cli/template/app/Cargo.toml.liquid index d527c83b8..47cc243b9 100644 --- a/libs/pavexc_cli/template/app/Cargo.toml.liquid +++ b/libs/pavexc_cli/template/app/Cargo.toml.liquid @@ -7,6 +7,13 @@ edition = "2021" path = "src/bin/bp.rs" name = "bp" +[lints.rust] +# `pavex_ide_hint` is used in Pavex's `f!` macro to "nudge" the IDE +# and force it to provide completions and "go-to-definition" correctly +# for the paths passed to the `f!` macro. +# It must be allowed in all local crates that use `f!`. +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(pavex_ide_hint)'] } + [dependencies] cargo_px_env = "0.1" pavex = { {{pavex_package_spec}} }