@@ -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:32 :1
10+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:37 :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:35 :1
16+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:40 :1
1717 |
1818LL | #[rustc_legacy_const_generics = 1]
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
@@ -66,6 +66,14 @@ LL | #[rustc_legacy_const_generics(0)]
6666LL | fn foo8<X>() {}
6767 | - non-const generic parameter
6868
69+ error: attribute should be applied to a function
70+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:33:5
71+ |
72+ LL | #[rustc_legacy_const_generics(0)]
73+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74+ LL | fn foo9<const X: usize>() {}
75+ | ---------------------------- not a function
76+
6977error: attribute should be applied to a function
7078 --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:5
7179 |
@@ -82,6 +90,6 @@ LL | fn foo7<const X: usize>();
8290 |
8391 = help: replace the const parameters with concrete consts
8492
85- error: aborting due to 12 previous errors
93+ error: aborting due to 13 previous errors
8694
8795For more information about this error, try `rustc --explain E0044`.
0 commit comments