Skip to content

Commit

Permalink
Merge pull request #906 from Havvy/fix-toolstate
Browse files Browse the repository at this point in the history
Use `doc`, not `test` for fn item inner attr example
  • Loading branch information
ehuss authored Nov 25, 2020
2 parents e4e4972 + 645a7b1 commit 762f9e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ responsibility to ensure that.
[Outer attributes][attributes] are allowed on functions. [Inner
attributes][attributes] are allowed directly after the `{` inside its [block].

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

```rust
fn test_only() {
#![test]
fn documented() {
#![doc = "Example"]
}
```

Expand Down

0 comments on commit 762f9e9

Please sign in to comment.