2018-11-17 10:39:58 +00:00
|
|
|
// compile-flags:--test
|
|
|
|
|
|
|
|
struct A {}
|
|
|
|
|
|
|
|
impl A {
|
2018-11-17 11:28:04 +00:00
|
|
|
#[test]
|
2023-04-07 02:32:55 +00:00
|
|
|
//~^ ERROR the `#[test]` attribute may only be used on a non-associated function
|
2020-03-17 12:27:56 +00:00
|
|
|
fn new() -> A {
|
|
|
|
A {}
|
|
|
|
}
|
|
|
|
#[test]
|
2023-04-07 02:32:55 +00:00
|
|
|
//~^ ERROR the `#[test]` attribute may only be used on a non-associated function
|
2020-03-17 12:27:56 +00:00
|
|
|
fn recovery_witness() -> A {
|
2018-11-17 11:28:04 +00:00
|
|
|
A {}
|
|
|
|
}
|
2018-11-17 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test() {
|
2018-11-17 11:28:04 +00:00
|
|
|
let _ = A::new();
|
2018-11-17 10:39:58 +00:00
|
|
|
}
|
|
|
|
|
2018-11-17 11:28:04 +00:00
|
|
|
fn main() {}
|