2021-06-30 10:57:17 -05:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
2022-03-16 04:49:54 -05:00
|
|
|
#[const_trait]
|
2021-06-30 10:57:17 -05:00
|
|
|
pub trait MyTrait {
|
2021-12-16 07:38:54 -06:00
|
|
|
fn defaulted_func(&self) {}
|
2021-06-30 10:57:17 -05:00
|
|
|
fn func(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct NonConst;
|
|
|
|
|
|
|
|
impl MyTrait for NonConst {
|
|
|
|
fn func(self) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Const;
|
|
|
|
|
|
|
|
impl const MyTrait for Const {
|
|
|
|
fn func(self) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|