We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba8b932 commit 3c421acCopy full SHA for 3c421ac
src/test/compile-fail/macro-error.rs
@@ -8,12 +8,15 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-// Check that we report errors at macro definition, not expansion.
+#![feature(type_macros)]
12
13
macro_rules! foo {
14
($a:expr) => $a; //~ ERROR macro rhs must be delimited
15
}
16
17
fn main() {
18
- foo!(0);
+ foo!(0); // Check that we report errors at macro definition, not expansion.
19
+
20
+ let _: cfg!(foo) = (); //~ ERROR non-type macro in type position
21
+ derive!(); //~ ERROR `derive` can only be used in attributes
22
0 commit comments