2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2024-06-21 12:22:29 +00:00
|
|
|
#![feature(const_trait_impl, rustc_attrs, effects)] //~ WARN the feature `effects` is incomplete
|
2023-01-13 13:27:40 +00:00
|
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
|
trait Foo {
|
|
|
|
|
#[rustc_do_not_const_check]
|
|
|
|
|
fn into_iter(&self) { println!("FEAR ME!") }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl const Foo for () {
|
|
|
|
|
fn into_iter(&self) {
|
|
|
|
|
// ^_^
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const _: () = Foo::into_iter(&());
|
|
|
|
|
|
|
|
|
|
fn main() {}
|