summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/attr-empty-expr.rs
blob: d4d1a3ee71e67c00c44aef199212ed27b8c059d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
// AST-based macro attributes expanding to an empty expression produce an error and not ICE.

#![feature(custom_test_frameworks)]
#![feature(stmt_expr_attributes)]
#![feature(test)]

fn main() {
    let _ = #[test] 0; //~ ERROR removing an expression is not supported in this position
    let _ = #[bench] 1; //~ ERROR removing an expression is not supported in this position
    let _ = #[test_case] 2; //~ ERROR removing an expression is not supported in this position
}