Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d4005b6

Browse files
committed
Rename tests/ui/coverage-attr/no-coverage.rs to allowed-positions.rs
1 parent a92c3cf commit d4005b6

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

tests/ui/coverage-attr/no-coverage.rs renamed to tests/ui/coverage-attr/allowed-positions.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
//! Tests where the `#[coverage(..)]` attribute can and cannot be used.
2+
13
//@ reference: attributes.coverage.allowed-positions
24

3-
#![feature(extern_types)]
45
#![feature(coverage_attribute)]
6+
#![feature(extern_types)]
57
#![feature(impl_trait_in_assoc_type)]
68
#![warn(unused_attributes)]
79
#![coverage(off)]

tests/ui/coverage-attr/no-coverage.stderr renamed to tests/ui/coverage-attr/allowed-positions.stderr

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0788]: attribute should be applied to a function definition or closure
2-
--> $DIR/no-coverage.rs:9:1
2+
--> $DIR/allowed-positions.rs:11:1
33
|
44
LL | #[coverage(off)]
55
| ^^^^^^^^^^^^^^^^
@@ -12,95 +12,95 @@ LL | | }
1212
| |_- not a function or closure
1313

1414
error[E0788]: attribute should be applied to a function definition or closure
15-
--> $DIR/no-coverage.rs:50:5
15+
--> $DIR/allowed-positions.rs:52:5
1616
|
1717
LL | #[coverage(off)]
1818
| ^^^^^^^^^^^^^^^^
1919
LL | let _ = ();
2020
| ----------- not a function or closure
2121

2222
error[E0788]: attribute should be applied to a function definition or closure
23-
--> $DIR/no-coverage.rs:54:9
23+
--> $DIR/allowed-positions.rs:56:9
2424
|
2525
LL | #[coverage(off)]
2626
| ^^^^^^^^^^^^^^^^
2727
LL | () => (),
2828
| -------- not a function or closure
2929

3030
error[E0788]: attribute should be applied to a function definition or closure
31-
--> $DIR/no-coverage.rs:58:5
31+
--> $DIR/allowed-positions.rs:60:5
3232
|
3333
LL | #[coverage(off)]
3434
| ^^^^^^^^^^^^^^^^
3535
LL | return ();
3636
| --------- not a function or closure
3737

3838
error[E0788]: attribute should be applied to a function definition or closure
39-
--> $DIR/no-coverage.rs:11:5
39+
--> $DIR/allowed-positions.rs:13:5
4040
|
4141
LL | #[coverage(off)]
4242
| ^^^^^^^^^^^^^^^^
4343
LL | const X: u32;
4444
| ------------- not a function or closure
4545

4646
error[E0788]: attribute should be applied to a function definition or closure
47-
--> $DIR/no-coverage.rs:14:5
47+
--> $DIR/allowed-positions.rs:16:5
4848
|
4949
LL | #[coverage(off)]
5050
| ^^^^^^^^^^^^^^^^
5151
LL | type T;
5252
| ------- not a function or closure
5353

5454
error[E0788]: attribute should be applied to a function definition or closure
55-
--> $DIR/no-coverage.rs:19:5
55+
--> $DIR/allowed-positions.rs:21:5
5656
|
5757
LL | #[coverage(off)]
5858
| ^^^^^^^^^^^^^^^^
5959
LL | fn f(&self);
6060
| ------------ not a function or closure
6161

6262
error[E0788]: attribute should be applied to a function definition or closure
63-
--> $DIR/no-coverage.rs:22:5
63+
--> $DIR/allowed-positions.rs:24:5
6464
|
6565
LL | #[coverage(off)]
6666
| ^^^^^^^^^^^^^^^^
6767
LL | fn g();
6868
| ------- not a function or closure
6969

7070
error[E0788]: attribute should be applied to a function definition or closure
71-
--> $DIR/no-coverage.rs:30:5
71+
--> $DIR/allowed-positions.rs:32:5
7272
|
7373
LL | #[coverage(off)]
7474
| ^^^^^^^^^^^^^^^^
7575
LL | type T = Self;
7676
| -------------- not a function or closure
7777

7878
error[E0788]: attribute should be applied to a function definition or closure
79-
--> $DIR/no-coverage.rs:33:5
79+
--> $DIR/allowed-positions.rs:35:5
8080
|
8181
LL | #[coverage(off)]
8282
| ^^^^^^^^^^^^^^^^
8383
LL | type U = impl Trait;
8484
| -------------------- not a function or closure
8585

8686
error[E0788]: attribute should be applied to a function definition or closure
87-
--> $DIR/no-coverage.rs:41:5
87+
--> $DIR/allowed-positions.rs:43:5
8888
|
8989
LL | #[coverage(off)]
9090
| ^^^^^^^^^^^^^^^^
9191
LL | static X: u32;
9292
| -------------- not a function or closure
9393

9494
error[E0788]: attribute should be applied to a function definition or closure
95-
--> $DIR/no-coverage.rs:44:5
95+
--> $DIR/allowed-positions.rs:46:5
9696
|
9797
LL | #[coverage(off)]
9898
| ^^^^^^^^^^^^^^^^
9999
LL | type T;
100100
| ------- not a function or closure
101101

102102
error: unconstrained opaque type
103-
--> $DIR/no-coverage.rs:34:14
103+
--> $DIR/allowed-positions.rs:36:14
104104
|
105105
LL | type U = impl Trait;
106106
| ^^^^^^^^^^

0 commit comments

Comments
 (0)