@@ -25,15 +25,15 @@ LL | #[rustc_legacy_const_generics(0)]
2525 = help: `#[rustc_legacy_const_generics]` can only be applied to functions
2626
2727error: suffixed literals are not allowed in attributes
28- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:22 :31
28+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:21 :31
2929 |
3030LL | #[rustc_legacy_const_generics(0usize)]
3131 | ^^^^^^
3232 |
3333 = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
3434
3535error[E0539]: malformed `rustc_legacy_const_generics` attribute input
36- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:22 :1
36+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:21 :1
3737 |
3838LL | #[rustc_legacy_const_generics(0usize)]
3939 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------^^
@@ -42,23 +42,23 @@ LL | #[rustc_legacy_const_generics(0usize)]
4242 | help: must be of the form: `#[rustc_legacy_const_generics(N)]`
4343
4444error: `#[rustc_legacy_const_generics]` attribute cannot be used on foreign functions
45- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:28 :5
45+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:27 :5
4646 |
4747LL | #[rustc_legacy_const_generics(1)]
4848 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4949 |
5050 = help: `#[rustc_legacy_const_generics]` can only be applied to functions
5151
5252error: `#[rustc_legacy_const_generics]` attribute cannot be used on inherent methods
53- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:37 :5
53+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:35 :5
5454 |
5555LL | #[rustc_legacy_const_generics(0)]
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5757 |
5858 = help: `#[rustc_legacy_const_generics]` can only be applied to functions
5959
6060error[E0539]: malformed `rustc_legacy_const_generics` attribute input
61- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:42 :1
61+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:39 :1
6262 |
6363LL | #[rustc_legacy_const_generics]
6464 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ LL | #[rustc_legacy_const_generics]
6767 | help: must be of the form: `#[rustc_legacy_const_generics(N)]`
6868
6969error[E0539]: malformed `rustc_legacy_const_generics` attribute input
70- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:45 :1
70+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:42 :1
7171 |
7272LL | #[rustc_legacy_const_generics = 1]
7373 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^
@@ -95,50 +95,23 @@ error: index exceeds number of arguments
9595LL | #[rustc_legacy_const_generics(2)]
9696 | ^ there are only 2 arguments
9797
98- error: attribute should be applied to a function definition
99- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:18:1
100- |
101- LL | #[rustc_legacy_const_generics(0)]
102- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103- LL |
104- LL | struct S;
105- | --------- not a function definition
106-
10798error: #[rustc_legacy_const_generics] functions must only have const generics
108- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:33 :1
99+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:31 :1
109100 |
110101LL | #[rustc_legacy_const_generics(0)]
111102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112103LL | fn foo8<X>() {}
113104 | - non-const generic parameter
114105
115- error: attribute should be applied to a function definition
116- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:37:5
117- |
118- LL | #[rustc_legacy_const_generics(0)]
119- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120- LL |
121- LL | fn foo9<const X: usize>() {}
122- | ---------------------------- not a function definition
123-
124- error: attribute should be applied to a function definition
125- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:28:5
126- |
127- LL | #[rustc_legacy_const_generics(1)]
128- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129- LL |
130- LL | fn foo7<const X: usize>();
131- | -------------------------- not a function definition
132-
133106error[E0044]: foreign items may not have const parameters
134- --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:30 :5
107+ --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:28 :5
135108 |
136109LL | fn foo7<const X: usize>();
137110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters
138111 |
139112 = help: replace the const parameters with concrete consts
140113
141- error: aborting due to 17 previous errors
114+ error: aborting due to 14 previous errors
142115
143116Some errors have detailed explanations: E0044, E0539.
144117For more information about an error, try `rustc --explain E0044`.
0 commit comments