rust/tests/ui/rfcs/rfc-2632-const-trait-impl/auxiliary/cross-crate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
288 B
Rust
Raw Normal View History

2023-08-06 08:20:55 -05:00
#![feature(const_trait_impl, effects)]
#[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) {
}
}