fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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