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