mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
21 lines
379 B
Rust
21 lines
379 B
Rust
// 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
|
|
}
|