Skip to content

Commit 762f9e9

Browse files
authored
Merge pull request #906 from Havvy/fix-toolstate
Use `doc`, not `test` for fn item inner attr example
2 parents e4e4972 + 645a7b1 commit 762f9e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/items/functions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ responsibility to ensure that.
290290
[Outer attributes][attributes] are allowed on functions. [Inner
291291
attributes][attributes] are allowed directly after the `{` inside its [block].
292292

293-
This example shows an inner attribute on a function. The function will only be
294-
available while running tests.
293+
This example shows an inner attribute on a function. The function is documented
294+
with just the word "Example".
295295

296296
```rust
297-
fn test_only() {
298-
#![test]
297+
fn documented() {
298+
#![doc = "Example"]
299299
}
300300
```
301301

0 commit comments

Comments
 (0)