blob: 4bf337d0f1b3cce86bd7b91484198b2c43780d74 [file] [log] [blame] [edit]
//@ compile-flags:--test
struct A {}
impl A {
#[test]
//~^ ERROR the `#[test]` attribute may only be used on a free function
fn new() -> A {
A {}
}
#[test]
//~^ ERROR the `#[test]` attribute may only be used on a free function
fn recovery_witness() -> A {
A {}
}
}
#[test]
fn test() {
let _ = A::new();
}
fn main() {}