Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use doc, not test for fn item inner attr example #906

Merged
merged 2 commits into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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