]> git.proxmox.com Git - rustc.git/blame - src/test/ui/proc-macro/inner-attrs.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / proc-macro / inner-attrs.rs
CommitLineData
6a06907d
XL
1// check-pass
2// compile-flags: -Z span-debug --error-format human
3// aux-build:test-macros.rs
4
5#![feature(custom_inner_attributes)]
6#![feature(proc_macro_hygiene)]
7#![feature(stmt_expr_attributes)]
8
9#![no_std] // Don't load unnecessary hygiene information from std
10extern crate std;
11
12#[macro_use]
13extern crate test_macros;
14
15#[print_target_and_args(first)]
16#[print_target_and_args(second)]
17fn foo() {
18 #![print_target_and_args(third)]
19 #![print_target_and_args(fourth)]
20}
21
22struct MyStruct {
23 field: bool
24}
25
26fn bar() {
27 (#![print_target_and_args(fifth)] 1, 2);
28
29 [#![print_target_and_args(sixth)] 1 , 2];
30 [#![print_target_and_args(seventh)] true ; 5];
31
32
33 match 0 {
34 #![print_target_and_args(eighth)]
35 _ => {}
36 }
37
38 MyStruct { #![print_target_and_args(ninth)] field: true };
39}
40
41extern {
42 fn weird_extern() {
43 #![print_target_and_args_consume(tenth)]
44 }
45}
46
47fn main() {}