about summary refs log tree commit diff
path: root/tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
blob: 8ee2223822a3c835989fb10d2190c179f700b45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ proc-macro: builtin-attrs.rs
//@ compile-flags:--test

#![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
}