about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-01 08:53:09 +0200
committerGitHub <noreply@github.com>2024-07-01 08:53:09 +0200
commitf5ef1cd17c0e4fb7aedafd4989938354e48cf0a7 (patch)
treee5241b890ea1fb611648e483561eb21222d52f4f
parentc9276ad27d98344f6edb5afc93f6b43f86212a2e (diff)
parent4c919ac50b5fabe341b35d9440bc84dcc3388130 (diff)
downloadrust-f5ef1cd17c0e4fb7aedafd4989938354e48cf0a7.tar.gz
rust-f5ef1cd17c0e4fb7aedafd4989938354e48cf0a7.zip
Rollup merge of #127191 - beetrees:register-out-of-scope-macro-calls, r=compiler-errors
Ensure `out_of_scope_macro_calls` lint is registered

Fixes part of https://github.com/rust-lang/rust/issues/126984#issuecomment-2198792687.
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs1
-rw-r--r--tests/ui/macros/out-of-scope-macro-calls-lint-registered.rs6
2 files changed, 7 insertions, 0 deletions
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() {}