1 error: suffixed literals are not allowed in attributes
2 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:21:31
4 LL | #[rustc_legacy_const_generics(0usize)]
7 = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
9 error: malformed `rustc_legacy_const_generics` attribute input
10 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:37:1
12 LL | #[rustc_legacy_const_generics]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
15 error: malformed `rustc_legacy_const_generics` attribute input
16 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:40:1
18 LL | #[rustc_legacy_const_generics = 1]
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
21 error: #[rustc_legacy_const_generics] must have one index for each generic parameter
22 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:3:1
24 LL | #[rustc_legacy_const_generics(0)]
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | - generic parameters
29 error: index exceeds number of arguments
30 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:6:31
32 LL | #[rustc_legacy_const_generics(1)]
33 | ^ there is only 1 argument
35 error: index exceeds number of arguments
36 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:9:31
38 LL | #[rustc_legacy_const_generics(2)]
39 | ^ there are only 2 arguments
41 error: arguments should be non-negative integers
42 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:12:31
44 LL | #[rustc_legacy_const_generics(a)]
47 error: arguments should be non-negative integers
48 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:15:34
50 LL | #[rustc_legacy_const_generics(1, a, 2, b)]
53 error: attribute should be applied to a function definition
54 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:18:1
56 LL | #[rustc_legacy_const_generics(0)]
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 | --------- not a function definition
61 error: #[rustc_legacy_const_generics] functions must only have const generics
62 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:29:1
64 LL | #[rustc_legacy_const_generics(0)]
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 | - non-const generic parameter
69 error: attribute should be applied to a function definition
70 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:33:5
72 LL | #[rustc_legacy_const_generics(0)]
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 LL | fn foo9<const X: usize>() {}
75 | ---------------------------- not a function definition
77 error: attribute should be applied to a function definition
78 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:5
80 LL | #[rustc_legacy_const_generics(1)]
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 LL | fn foo7<const X: usize>();
83 | -------------------------- not a function definition
85 error[E0044]: foreign items may not have const parameters
86 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:26:5
88 LL | fn foo7<const X: usize>();
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters
91 = help: replace the const parameters with concrete consts
93 error: aborting due to 13 previous errors
95 For more information about this error, try `rustc --explain E0044`.