]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | #![feature(const_trait_impl)] |
2 | ||
923072b8 | 3 | #[const_trait] |
136023e0 | 4 | pub trait MyTrait { |
a2a8927a | 5 | fn defaulted_func(&self) {} |
136023e0 XL |
6 | fn func(self); |
7 | } | |
8 | ||
9 | pub struct NonConst; | |
10 | ||
11 | impl MyTrait for NonConst { | |
12 | fn func(self) { | |
13 | ||
14 | } | |
15 | } | |
16 | ||
17 | pub struct Const; | |
18 | ||
19 | impl const MyTrait for Const { | |
20 | fn func(self) { | |
21 | ||
22 | } | |
23 | } |