about summary refs log tree commit diff
diff options
context:
space:
mode:
-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() {}