File: const-impl-trait.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 893,176 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (187 lines) | stat: -rw-r--r-- 7,735 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
error[E0635]: unknown feature `const_cmp`
  --> $DIR/const-impl-trait.rs:7:30
   |
LL | #![feature(const_trait_impl, const_cmp, const_destruct)]
   |                              ^^^^^^^^^

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:11:23
   |
LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
   |                       ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:11:23
   |
LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
   |                       ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:16:13
   |
LL |     x: impl ~const PartialEq + ~const Destruct,
   |             ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:17:11
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |           ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:17:11
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |           ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:17:11
   |
LL | ) -> impl ~const PartialEq + ~const Destruct {
   |           ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:16:13
   |
LL |     x: impl ~const PartialEq + ~const Destruct,
   |             ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:23:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:27:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:27:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:23:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:23:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:27:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy {
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:23:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: `~const` can only be applied to `#[const_trait]` traits
  --> $DIR/const-impl-trait.rs:23:22
   |
LL |     fn huh() -> impl ~const PartialEq + ~const Destruct + Copy;
   |                      ^^^^^^ can't be applied to `PartialEq`
   |
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0015]: cannot call non-const operator in constants
  --> $DIR/const-impl-trait.rs:35:13
   |
LL |     assert!(wrap(123) == wrap(123));
   |             ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constants
  --> $DIR/const-impl-trait.rs:36:13
   |
LL |     assert!(wrap(123) != wrap(456));
   |             ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constants
  --> $DIR/const-impl-trait.rs:38:13
   |
LL |     assert!(x == x);
   |             ^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants

error[E0015]: cannot call non-const operator in constant functions
  --> $DIR/const-impl-trait.rs:12:5
   |
LL |     a == a
   |     ^^^^^^
   |
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants

error: aborting due to 20 previous errors

Some errors have detailed explanations: E0015, E0635.
For more information about an error, try `rustc --explain E0015`.