rust/src/test/ui/consts/const-external-macro-const-err.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
380 B
Rust
Raw Normal View History

// 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
2021-01-30 07:49:22 -06:00
//~| WARN this was previously accepted by the compiler but is being phased out
}