mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-18 07:47:44 +00:00
25 lines
312 B
Rust
25 lines
312 B
Rust
//@ compile-flags: -Znext-solver
|
|
#![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) {
|
|
|
|
}
|
|
}
|