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