@@ -14,110 +14,145 @@ error: `~const` can only be applied to `#[const_trait]` traits
14
14
--> $DIR/fn_trait_refs.rs:14:8
15
15
|
16
16
LL | T: ~const Fn<()> + ~const Destruct,
17
- | ^^^^^^
17
+ | ^^^^^^ can't be applied to `Fn`
18
+ |
19
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
20
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
18
21
19
22
error: `~const` can only be applied to `#[const_trait]` traits
20
23
--> $DIR/fn_trait_refs.rs:14:8
21
24
|
22
25
LL | T: ~const Fn<()> + ~const Destruct,
23
- | ^^^^^^
26
+ | ^^^^^^ can't be applied to `Fn`
24
27
|
28
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
29
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
25
30
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
26
31
27
32
error: `~const` can only be applied to `#[const_trait]` traits
28
33
--> $DIR/fn_trait_refs.rs:14:8
29
34
|
30
35
LL | T: ~const Fn<()> + ~const Destruct,
31
- | ^^^^^^
36
+ | ^^^^^^ can't be applied to `Fn`
32
37
|
38
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
39
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
33
40
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
34
41
35
42
error: `~const` can only be applied to `#[const_trait]` traits
36
43
--> $DIR/fn_trait_refs.rs:21:8
37
44
|
38
45
LL | T: ~const FnMut<()> + ~const Destruct,
39
- | ^^^^^^
46
+ | ^^^^^^ can't be applied to `FnMut`
47
+ |
48
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
49
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
40
50
41
51
error: `~const` can only be applied to `#[const_trait]` traits
42
52
--> $DIR/fn_trait_refs.rs:21:8
43
53
|
44
54
LL | T: ~const FnMut<()> + ~const Destruct,
45
- | ^^^^^^
55
+ | ^^^^^^ can't be applied to `FnMut`
46
56
|
57
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
58
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
47
59
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
48
60
49
61
error: `~const` can only be applied to `#[const_trait]` traits
50
62
--> $DIR/fn_trait_refs.rs:21:8
51
63
|
52
64
LL | T: ~const FnMut<()> + ~const Destruct,
53
- | ^^^^^^
65
+ | ^^^^^^ can't be applied to `FnMut`
54
66
|
67
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
68
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
55
69
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
56
70
57
71
error: `~const` can only be applied to `#[const_trait]` traits
58
72
--> $DIR/fn_trait_refs.rs:28:8
59
73
|
60
74
LL | T: ~const FnOnce<()>,
61
- | ^^^^^^
75
+ | ^^^^^^ can't be applied to `FnOnce`
76
+ |
77
+ note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
78
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
62
79
63
80
error: `~const` can only be applied to `#[const_trait]` traits
64
81
--> $DIR/fn_trait_refs.rs:28:8
65
82
|
66
83
LL | T: ~const FnOnce<()>,
67
- | ^^^^^^
84
+ | ^^^^^^ can't be applied to `FnOnce`
68
85
|
86
+ note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
87
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
69
88
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
70
89
71
90
error: `~const` can only be applied to `#[const_trait]` traits
72
91
--> $DIR/fn_trait_refs.rs:28:8
73
92
|
74
93
LL | T: ~const FnOnce<()>,
75
- | ^^^^^^
94
+ | ^^^^^^ can't be applied to `FnOnce`
76
95
|
96
+ note: `FnOnce` can't be used with `~const` because it isn't annotated with `#[const_trait]`
97
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
77
98
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
78
99
79
100
error: `~const` can only be applied to `#[const_trait]` traits
80
101
--> $DIR/fn_trait_refs.rs:35:8
81
102
|
82
103
LL | T: ~const Fn<()> + ~const Destruct,
83
- | ^^^^^^
104
+ | ^^^^^^ can't be applied to `Fn`
105
+ |
106
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
107
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
84
108
85
109
error: `~const` can only be applied to `#[const_trait]` traits
86
110
--> $DIR/fn_trait_refs.rs:35:8
87
111
|
88
112
LL | T: ~const Fn<()> + ~const Destruct,
89
- | ^^^^^^
113
+ | ^^^^^^ can't be applied to `Fn`
90
114
|
115
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
116
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
91
117
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
92
118
93
119
error: `~const` can only be applied to `#[const_trait]` traits
94
120
--> $DIR/fn_trait_refs.rs:35:8
95
121
|
96
122
LL | T: ~const Fn<()> + ~const Destruct,
97
- | ^^^^^^
123
+ | ^^^^^^ can't be applied to `Fn`
98
124
|
125
+ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_trait]`
126
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
99
127
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
100
128
101
129
error: `~const` can only be applied to `#[const_trait]` traits
102
130
--> $DIR/fn_trait_refs.rs:49:8
103
131
|
104
132
LL | T: ~const FnMut<()> + ~const Destruct,
105
- | ^^^^^^
133
+ | ^^^^^^ can't be applied to `FnMut`
134
+ |
135
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
136
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
106
137
107
138
error: `~const` can only be applied to `#[const_trait]` traits
108
139
--> $DIR/fn_trait_refs.rs:49:8
109
140
|
110
141
LL | T: ~const FnMut<()> + ~const Destruct,
111
- | ^^^^^^
142
+ | ^^^^^^ can't be applied to `FnMut`
112
143
|
144
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
145
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
113
146
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
114
147
115
148
error: `~const` can only be applied to `#[const_trait]` traits
116
149
--> $DIR/fn_trait_refs.rs:49:8
117
150
|
118
151
LL | T: ~const FnMut<()> + ~const Destruct,
119
- | ^^^^^^
152
+ | ^^^^^^ can't be applied to `FnMut`
120
153
|
154
+ note: `FnMut` can't be used with `~const` because it isn't annotated with `#[const_trait]`
155
+ --> $SRC_DIR/core/src/ops/function.rs:LL:COL
121
156
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
122
157
123
158
error[E0277]: the trait bound `fn() -> i32 {one}: const Destruct` is not satisfied
0 commit comments