]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/proc-macro-gates2.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / proc-macro / proc-macro-gates2.rs
1 // aux-build:test-macros.rs
2
3 #![feature(stmt_expr_attributes)]
4
5 #[macro_use]
6 extern crate test_macros;
7
8 // NB. these errors aren't the best errors right now, but they're definitely
9 // intended to be errors. Somehow using a custom attribute in these positions
10 // should either require a feature gate or not be allowed on stable.
11
12 fn _test6<#[empty_attr] T>() {}
13 //~^ ERROR: expected non-macro attribute, found attribute macro
14
15 fn _test7() {
16     match 1 {
17         #[empty_attr] //~ ERROR: expected non-macro attribute, found attribute macro
18         0 => {}
19         _ => {}
20     }
21 }
22
23 fn main() {
24 }