summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs
blob: e73082c11276fc4f8af6a8a0dc61f98b8348d9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![feature(const_trait_impl)]

#[const_trait]
pub trait MyTrait {
    fn defaulted_func(&self) {}
    fn func(self);
}

pub struct NonConst;

impl MyTrait for NonConst {
    fn func(self) {

    }
}

pub struct Const;

impl const MyTrait for Const {
    fn func(self) {

    }
}