File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ fn clone_projection<T: Trait>(p: &T::Proj) -> T::Proj {
147
147
``` rust,compile_fail,E0277
148
148
#![feature(const_trait_impl)]
149
149
150
+ #[const_trait]
150
151
trait Trait {
151
152
type Proj: ~const Clone;
152
153
}
@@ -163,6 +164,7 @@ const fn clone_projection<T: ~const Trait>(p: &T::Proj) -> T::Proj {
163
164
``` rust,compile_fail
164
165
#![feature(const_trait_impl)]
165
166
struct Cfg<C>(C);
167
+ #[const_trait]
166
168
trait CfgBase {}
167
169
// error: `~const` is not allowed here
168
170
impl<C: ~const CfgBase> Cfg<C> {
@@ -175,6 +177,7 @@ A work-around is to move the trait bounds to the `const fn`s inside.
175
177
``` rust
176
178
#![feature(const_trait_impl)]
177
179
struct Cfg <C >(C );
180
+ #[const_trait]
178
181
trait CfgBase {}
179
182
impl <C > Cfg <C > {
180
183
const fn num_task_priority_levels (& self , _ : usize )
You can’t perform that action at this time.
0 commit comments