Skip to content

Fix some typos #29017

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

Merged
merged 1 commit into from
Oct 21, 2015
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
11 changes: 6 additions & 5 deletions src/doc/trpl/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Let's discuss our sample example documentation:
```

You'll notice that you don't need a `fn main()` or anything here. `rustdoc` will
automatically add a main() wrapper around your code, and in the right place.
automatically add a `main()` wrapper around your code, and in the right place.
For example:

```rust
Expand All @@ -234,7 +234,7 @@ fn main() {
}
```

Here's the full algorithm rustdoc uses to postprocess examples:
Here's the full algorithm rustdoc uses to preprocess examples:

1. Any leading `#![foo]` attributes are left intact as crate attributes.
2. Some common `allow` attributes are inserted, including
Expand Down Expand Up @@ -377,7 +377,7 @@ things, so they don’t show up in the output.

### Running documentation tests

To run the tests, either
To run the tests, either:

```bash
$ rustdoc --test path/to/my/crate/root.rs
Expand Down Expand Up @@ -502,7 +502,8 @@ This `%` line needs to be the very first line of the file.

## `doc` attributes

At a deeper level, documentation comments are sugar for documentation attributes:
At a deeper level, documentation comments are syntactic sugar for documentation
attributes:

```rust
/// this
Expand Down Expand Up @@ -533,7 +534,7 @@ extern crate foo;
pub use foo::bar;
```

This will create documentation for bar both inside the documentation for the
This will create documentation for `bar` both inside the documentation for the
crate `foo`, as well as the documentation for your crate. It will use the same
documentation in both places.

Expand Down