]> git.lizzy.rs Git - rust.git/blob - src/test/ui/invalid-rustc_args_required_const-arguments.stderr
Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis
[rust.git] / src / test / ui / invalid-rustc_args_required_const-arguments.stderr
1 error: suffixed literals are not allowed in attributes
2   --> $DIR/invalid-rustc_args_required_const-arguments.rs:18:29
3    |
4 LL | #[rustc_args_required_const(0usize)]
5    |                             ^^^^^^
6    |
7    = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
8
9 error: index exceeds number of arguments
10   --> $DIR/invalid-rustc_args_required_const-arguments.rs:3:29
11    |
12 LL | #[rustc_args_required_const(0)]
13    |                             ^ there are only 0 arguments
14
15 error: index exceeds number of arguments
16   --> $DIR/invalid-rustc_args_required_const-arguments.rs:6:29
17    |
18 LL | #[rustc_args_required_const(1)]
19    |                             ^ there is only 1 argument
20
21 error: arguments should be non-negative integers
22   --> $DIR/invalid-rustc_args_required_const-arguments.rs:9:29
23    |
24 LL | #[rustc_args_required_const(a)]
25    |                             ^
26
27 error: arguments should be non-negative integers
28   --> $DIR/invalid-rustc_args_required_const-arguments.rs:12:32
29    |
30 LL | #[rustc_args_required_const(1, a, 2, b)]
31    |                                ^     ^
32
33 error: attribute should be applied to a function
34   --> $DIR/invalid-rustc_args_required_const-arguments.rs:15:1
35    |
36 LL | #[rustc_args_required_const(0)]
37    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 LL | struct S;
39    | --------- not a function
40
41 error: index exceeds number of arguments
42   --> $DIR/invalid-rustc_args_required_const-arguments.rs:22:33
43    |
44 LL |     #[rustc_args_required_const(1)]
45    |                                 ^ there is only 1 argument
46
47 error: aborting due to 7 previous errors
48