Files
rust/tests/ui/traits/const-traits/do-not-const-check-override.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
358 B
Rust
Raw Normal View History

2023-01-13 13:27:40 +00:00
//@ check-pass
2024-06-30 17:08:45 +00:00
//@ compile-flags: -Znext-solver
#![allow(incomplete_features)]
2024-10-30 18:03:44 +00:00
#![feature(const_trait_impl, rustc_attrs)]
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() {}