mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
7f37f8af5f
These attributes apply to all enclosed functions/methods/closures, unless explicitly overridden by another coverage attribute.
97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
error[E0788]: attribute should be applied to a function definition or closure
|
|
--> $DIR/no-coverage.rs:7: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:39: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:43: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:47: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:9: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:12: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:22: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:25: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:30: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:33:5
|
|
|
|
|
LL | #[coverage(off)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
LL | type T;
|
|
| ------- not a function or closure
|
|
|
|
error: unconstrained opaque type
|
|
--> $DIR/no-coverage.rs:26: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`.
|