2022-05-28 21:20:43 +00:00
|
|
|
#![feature(extern_types)]
|
2023-08-24 19:15:41 +00:00
|
|
|
#![feature(coverage_attribute)]
|
2023-04-12 13:32:15 +00:00
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
2022-05-28 21:20:43 +00:00
|
|
|
#![warn(unused_attributes)]
|
2023-08-09 14:57:16 +00:00
|
|
|
#![coverage(off)]
|
|
|
|
//~^ WARN: `#[coverage]` does not propagate into items and must be applied to the contained functions directly
|
2022-05-28 21:20:43 +00:00
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
|
|
|
//~^ WARN: `#[coverage]` does not propagate into items and must be applied to the contained functions directly
|
2022-05-28 21:20:43 +00:00
|
|
|
trait Trait {
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
const X: u32;
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
type T;
|
|
|
|
|
|
|
|
type U;
|
|
|
|
}
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
|
|
|
//~^ WARN: `#[coverage]` does not propagate into items and must be applied to the contained functions directly
|
2022-05-28 21:20:43 +00:00
|
|
|
impl Trait for () {
|
|
|
|
const X: u32 = 0;
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
type T = Self;
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
type U = impl Trait; //~ ERROR unconstrained opaque type
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" {
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
static X: u32;
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)] //~ ERROR `#[coverage]` must be applied to coverable code
|
2022-05-28 21:20:43 +00:00
|
|
|
type T;
|
|
|
|
}
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
2022-05-28 21:20:43 +00:00
|
|
|
fn main() {
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
|
|
|
//~^ WARN `#[coverage]` may only be applied to function definitions
|
2022-05-28 21:20:43 +00:00
|
|
|
let _ = ();
|
|
|
|
|
|
|
|
match () {
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
|
|
|
//~^ WARN `#[coverage]` may only be applied to function definitions
|
2022-05-28 21:20:43 +00:00
|
|
|
() => (),
|
|
|
|
}
|
|
|
|
|
2023-08-09 14:57:16 +00:00
|
|
|
#[coverage(off)]
|
|
|
|
//~^ WARN `#[coverage]` may only be applied to function definitions
|
2022-05-28 21:20:43 +00:00
|
|
|
return ();
|
|
|
|
}
|