1
Fork 0
rust/src/test/ui/rfc-2632-const-trait-impl/attr-misuse.rs

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

14 lines
359 B
Rust
Raw Normal View History

2021-07-10 15:58:16 +08:00
#![feature(const_trait_impl)]
#[default_method_body_is_const] //~ ERROR attribute should be applied
trait A {
#[default_method_body_is_const] //~ ERROR attribute should be applied
fn no_body(self);
#[default_method_body_is_const]
fn correct_use(&self) {}
}
#[default_method_body_is_const] //~ ERROR attribute should be applied
fn main() {}