diff options
Diffstat (limited to 'src/test/ui/consts/const-external-macro-const-err.rs')
-rw-r--r-- | src/test/ui/consts/const-external-macro-const-err.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-external-macro-const-err.rs b/src/test/ui/consts/const-external-macro-const-err.rs new file mode 100644 index 000000000..440c42e32 --- /dev/null +++ b/src/test/ui/consts/const-external-macro-const-err.rs @@ -0,0 +1,14 @@ +// 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 + //~| WARN this was previously accepted by the compiler but is being phased out +} |