@@ -7,13 +7,13 @@ LL | #[rustc_legacy_const_generics(0usize)]
77 = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
88
99error: malformed `rustc_legacy_const_generics` attribute input
10- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:29 :1
10+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:32 :1
1111 |
1212LL | #[rustc_legacy_const_generics]
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
1414
1515error: malformed `rustc_legacy_const_generics` attribute input
16- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:32 :1
16+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:35 :1
1717 |
1818LL | #[rustc_legacy_const_generics = 1]
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
@@ -56,11 +56,19 @@ LL | #[rustc_legacy_const_generics(0)]
5656LL | struct S;
5757 | --------- not a function
5858
59+ error: #[rustc_legacy_const_generics] functions must only have const generics
60+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:29:31
61+ |
62+ LL | #[rustc_legacy_const_generics(0)]
63+ | ^
64+ LL | fn foo8<X>() {}
65+ | - non-const generic parameter
66+
5967error: index exceeds number of arguments
6068 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:35
6169 |
6270LL | #[rustc_legacy_const_generics(1)]
6371 | ^ there is only 1 argument
6472
65- error: aborting due to 10 previous errors
73+ error: aborting due to 11 previous errors
6674
0 commit comments