]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | #![feature(const_trait_impl)] |
2 | ||
3 | pub trait MyTrait { | |
a2a8927a XL |
4 | #[default_method_body_is_const] |
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 | } |