error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:8:1 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | / trait Trait { LL | | #[coverage(off)] LL | | const X: u32; ... | LL | | type U; LL | | } | |_- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:40:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | let _ = (); | ----------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:44:9 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | () => (), | -------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:48:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | return (); | --------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:10:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | const X: u32; | ------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:13:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | type T; | ------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:23:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | type T = Self; | -------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:26:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | type U = impl Trait; | -------------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:31:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | static X: u32; | -------------- not a function or closure error[E0788]: attribute should be applied to a function definition or closure --> $DIR/no-coverage.rs:34:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ LL | type T; | ------- not a function or closure error: unconstrained opaque type --> $DIR/no-coverage.rs:27:14 | LL | type U = impl Trait; | ^^^^^^^^^^ | = note: `U` must be used in combination with a concrete type within the same impl error: aborting due to 11 previous errors For more information about this error, try `rustc --explain E0788`.