mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
24 lines
358 B
Rust
24 lines
358 B
Rust
//@ compile-flags: -Znext-solver
|
|
//@ check-pass
|
|
|
|
#![feature(const_trait_impl, effects)]
|
|
//~^ WARN the feature `effects` is incomplete
|
|
|
|
#[const_trait]
|
|
trait Trait {
|
|
fn method() {}
|
|
}
|
|
|
|
impl const Trait for () {}
|
|
|
|
fn main() {
|
|
let mut x = const {
|
|
let x = <()>::method;
|
|
x();
|
|
x
|
|
};
|
|
let y = <()>::method;
|
|
y();
|
|
x = y;
|
|
}
|