]>
Commit | Line | Data |
---|---|---|
1b1a35ee XL |
1 | #![feature(rustc_attrs)] |
2 | ||
3 | #[rustc_args_required_const(0)] //~ ERROR index exceeds number of arguments | |
4 | fn foo1() {} | |
5 | ||
6 | #[rustc_args_required_const(1)] //~ ERROR index exceeds number of arguments | |
7 | fn foo2(_: u8) {} | |
8 | ||
9 | #[rustc_args_required_const(a)] //~ ERROR arguments should be non-negative integers | |
10 | fn foo4() {} | |
11 | ||
12 | #[rustc_args_required_const(1, a, 2, b)] //~ ERROR arguments should be non-negative integers | |
13 | fn foo5(_: u8, _: u8, _: u8) {} | |
14 | ||
15 | #[rustc_args_required_const(0)] //~ ERROR attribute should be applied to a function | |
16 | struct S; | |
17 | ||
18 | #[rustc_args_required_const(0usize)] //~ ERROR suffixed literals are not allowed in attributes | |
19 | fn foo6(_: u8) {} | |
20 | ||
21 | extern { | |
22 | #[rustc_args_required_const(1)] //~ ERROR index exceeds number of arguments | |
23 | fn foo7(_: u8); | |
24 | } | |
25 | ||
fc512014 XL |
26 | #[rustc_args_required_const] //~ ERROR malformed `rustc_args_required_const` attribute |
27 | fn bar1() {} | |
28 | ||
29 | #[rustc_args_required_const = 1] //~ ERROR malformed `rustc_args_required_const` attribute | |
30 | fn bar2() {} | |
31 | ||
1b1a35ee | 32 | fn main() {} |