mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
20 lines
302 B
Rust
20 lines
302 B
Rust
// check-pass
|
|
#![feature(const_trait_impl, rustc_attrs, effects)]
|
|
|
|
#[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() {}
|