Skip to content

Commit f61675f

Browse files
authored
Merge pull request #1740 from kberov/meta_doc
Wrapped long lines and put #[doc] in backquotes.
2 parents e314c6c + 257c339 commit f61675f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/meta/doc.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Use `cargo doc` to build documentation in `target/doc`.
44

5-
Use `cargo test` to run all tests (including documentation tests), and `cargo test --doc` to only run documentation tests.
5+
Use `cargo test` to run all tests (including documentation tests), and `cargo
6+
test --doc` to only run documentation tests.
67

78
These commands will appropriately invoke `rustdoc` (and `rustc`) as required.
89

@@ -67,7 +68,8 @@ $ rustdoc --test --extern doc="libdoc.rlib" doc.rs
6768

6869
## Doc attributes
6970

70-
Below are a few examples of the most common `#[doc]` attributes used with `rustdoc`.
71+
Below are a few examples of the most common `#[doc]` attributes used with
72+
`rustdoc`.
7173

7274
### `inline`
7375

@@ -104,7 +106,8 @@ Using this tells `rustdoc` not to include this in documentation:
104106
pub use self::async_await::*;
105107
```
106108

107-
For documentation, `rustdoc` is widely used by the community. It's what is used to generate the [std library docs](https://doc.rust-lang.org/std/).
109+
For documentation, `rustdoc` is widely used by the community. It's what is used
110+
to generate the [std library docs](https://doc.rust-lang.org/std/).
108111

109112
### See also:
110113

src/meta/playground.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Playground
22

3-
The [Rust Playground](https://play.rust-lang.org/) is a way to experiment with Rust code through a web interface.
3+
The [Rust Playground](https://play.rust-lang.org/) is a way to experiment with
4+
Rust code through a web interface.
45

56
## Using it with `mdbook`
67

@@ -12,15 +13,18 @@ fn main() {
1213
}
1314
```
1415

15-
This allows the reader to both run your code sample, but also modify and tweak it. The key here is the adding the word `editable` to your codefence block separated by a comma.
16+
This allows the reader to both run your code sample, but also modify and tweak
17+
it. The key here is the adding the word `editable` to your codefence block
18+
separated by a comma.
1619

1720
````markdown
1821
```rust,editable
1922
//...place your code here
2023
```
2124
````
2225

23-
Additionally, you can add `ignore` if you want `mdbook` to skip your code when it builds and tests.
26+
Additionally, you can add `ignore` if you want `mdbook` to skip your code when
27+
it builds and tests.
2428

2529
````markdown
2630
```rust,editable,ignore
@@ -30,7 +34,10 @@ Additionally, you can add `ignore` if you want `mdbook` to skip your code when i
3034

3135
## Using it with docs
3236

33-
You may have noticed in some of the [official Rust docs][official-rust-docs] a button that says "Run", which opens the code sample up in a new tab in Rust Playground. This feature is enabled if you use the #[doc] attribute called [`html_playground_url`][html-playground-url].
37+
You may have noticed in some of the [official Rust docs][official-rust-docs] a
38+
button that says "Run", which opens the code sample up in a new tab in Rust
39+
Playground. This feature is enabled if you use the `#[doc]` attribute called
40+
[`html_playground_url`][html-playground-url].
3441

3542
### See also:
3643

0 commit comments

Comments
 (0)