@@ -7,13 +7,13 @@ LL | #[rustc_legacy_const_generics(0usize)]
7
7
= help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
8
8
9
9
error: 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
11
11
|
12
12
LL | #[rustc_legacy_const_generics]
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
14
14
15
15
error: 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
17
17
|
18
18
LL | #[rustc_legacy_const_generics = 1]
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]`
@@ -66,6 +66,14 @@ LL | #[rustc_legacy_const_generics(0)]
66
66
LL | fn foo8<X>() {}
67
67
| - non-const generic parameter
68
68
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
+
69
77
error: attribute should be applied to a function
70
78
--> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:5
71
79
|
@@ -82,6 +90,6 @@ LL | fn foo7<const X: usize>();
82
90
|
83
91
= help: replace the const parameters with concrete consts
84
92
85
- error: aborting due to 12 previous errors
93
+ error: aborting due to 13 previous errors
86
94
87
95
For more information about this error, try `rustc --explain E0044`.
0 commit comments