summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.rs
blob: 6a47e50f62dbb6bbc0872213531d539760acdf70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// aux-build: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
}