]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // aux-build:builtin-attrs.rs |
2 | ||
3 | #![feature(decl_macro)] //~ ERROR `feature` is ambiguous | |
4 | ||
5 | extern crate builtin_attrs; | |
6 | use builtin_attrs::{test, bench}; | |
7 | use builtin_attrs::*; | |
8 | ||
9 | #[repr(C)] //~ ERROR `repr` is ambiguous | |
10 | struct S; | |
11 | #[cfg_attr(all(), repr(C))] //~ ERROR `repr` is ambiguous | |
12 | struct SCond; | |
13 | ||
14 | #[test] // OK, shadowed | |
15 | fn test() {} | |
16 | ||
17 | #[bench] // OK, shadowed | |
18 | fn bench() {} | |
19 | ||
fc512014 XL |
20 | fn non_macro_expanded_location<#[repr(C)] T>() { |
21 | //~^ ERROR `repr` is ambiguous | |
22 | //~| ERROR attribute should be applied to a struct, enum, or union | |
b7449926 XL |
23 | match 0u8 { |
24 | #[repr(C)] //~ ERROR `repr` is ambiguous | |
25 | _ => {} | |
26 | } | |
27 | } | |
28 | ||
29 | fn main() { | |
30 | Test; | |
31 | Bench; | |
32 | NonExistent; //~ ERROR cannot find value `NonExistent` in this scope | |
33 | } |