rust/tests/ui/traits/const-traits/do-not-const-check-override.rs
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

22 lines
367 B
Rust

//@ check-pass
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
#![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() {}