From 4c919ac50b5fabe341b35d9440bc84dcc3388130 Mon Sep 17 00:00:00 2001 From: beetrees Date: Mon, 1 Jul 2024 00:24:56 +0100 Subject: [PATCH] Ensure `out_of_scope_macro_calls` lint is registered --- compiler/rustc_lint_defs/src/builtin.rs | 1 + tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 472e93d202d..2ade6964ca8 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -74,6 +74,7 @@ declare_lint_pass! { NON_CONTIGUOUS_RANGE_ENDPOINTS, NON_EXHAUSTIVE_OMITTED_PATTERNS, ORDER_DEPENDENT_TRAIT_OBJECTS, + OUT_OF_SCOPE_MACRO_CALLS, OVERLAPPING_RANGE_ENDPOINTS, PATTERNS_IN_FNS_WITHOUT_BODY, PRIVATE_BOUNDS, diff --git a/tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs b/tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs new file mode 100644 index 00000000000..0736c373d57 --- /dev/null +++ b/tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs @@ -0,0 +1,6 @@ +//@ check-pass + +#![deny(unknown_lints)] +#![allow(out_of_scope_macro_calls)] + +fn main() {}