rust/tests/ui/macros/macro-error.rs

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

10 lines
246 B
Rust
Raw Normal View History

macro_rules! foo {
($a:expr) => a; //~ ERROR macro rhs must be delimited
}
fn main() {
2016-05-21 09:58:42 +08:00
foo!(0); // Check that we report errors at macro definition, not expansion.
let _: cfg!(FALSE) = (); //~ ERROR non-type macro in type position
}