Skip to content

Commit 6fe508f

Browse files
committed
Move attributes.coverage.allowed-positions below syntax
Toss up which makes more sense in sequence, but this felt a little better to me.
1 parent 73b4272 commit 6fe508f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/attributes/coverage-instrumentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ r[attributes.coverage]
1313
r[attributes.coverage.intro]
1414
The *`coverage` [attribute]* indicates whether a function should instrument code coverage at all and show up in code coverage reports.
1515

16-
r[attributes.coverage.allowed-positions]
17-
The `coverage` attribute can only be controlled at the function level, but it can be applied to modules, `impl` blocks, or anything that can contain functions.
18-
1916
r[attributes.coverage.syntax]
2017
There are two ways to use the coverage attribute:
2118

2219
* `#[coverage(off)]` indicates that all functions within an item, recursively, should not be instrumented, unless specified by another attribute.
2320
* `#[coverage(on)]` (the default) indicates that all functions within an item, recursively, *should* be instrumented, unless specified by another attribute.
2421

22+
r[attributes.coverage.allowed-positions]
23+
The `coverage` attribute can only be controlled at the function level, but it can be applied to modules, `impl` blocks, or anything that can contain functions.
24+
2525
r[attributes.coverage.nesting]
2626
More-specific attributes always take priority over less-specific ones, e.g. if a crate is marked `#![coverage(off)]`, then functions inside that crate marked `#[coverage(on)]` will still have coverage.
2727

0 commit comments

Comments
 (0)