blob: e580e0784b34e570a46e3f74def46bea7c1be366 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//@ proc-macro: builtin-attrs.rs
//@ compile-flags:--test
//@ ignore-backends: gcc
#![feature(decl_macro, test)]
extern crate test;
extern crate builtin_attrs;
use builtin_attrs::{test, bench};
#[test] // OK, shadowed
fn test() {}
#[bench] // OK, shadowed
fn bench(b: &mut test::Bencher) {}
fn not_main() {
Test;
Bench;
NonExistent; //~ ERROR cannot find value `NonExistent` in this scope
}
|