summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-external-macro-const-err.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-external-macro-const-err.rs')
-rw-r--r--tests/ui/consts/const-external-macro-const-err.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/consts/const-external-macro-const-err.rs b/tests/ui/consts/const-external-macro-const-err.rs
new file mode 100644
index 000000000..5bd84330b
--- /dev/null
+++ b/tests/ui/consts/const-external-macro-const-err.rs
@@ -0,0 +1,13 @@
+// edition:2018
+// aux-build:external_macro.rs
+
+// Ensure that CONST_ERR lint errors
+// are not silenced in external macros.
+// https://github.com/rust-lang/rust/issues/65300
+
+extern crate external_macro;
+use external_macro::static_assert;
+
+fn main() {
+ static_assert!(2 + 2 == 5); //~ ERROR constant
+}