]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/ambiguous-builtin-attrs-test.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / ambiguous-builtin-attrs-test.rs
1 // aux-build:builtin-attrs.rs
2 // compile-flags:--test
3
4 #![feature(decl_macro, test)]
5
6 extern crate test;
7 extern crate builtin_attrs;
8 use builtin_attrs::{test, bench};
9
10 #[test] // OK, shadowed
11 fn test() {}
12
13 #[bench] // OK, shadowed
14 fn bench(b: &mut test::Bencher) {}
15
16 fn not_main() {
17     Test;
18     Bench;
19     NonExistent; //~ ERROR cannot find value `NonExistent` in this scope
20 }