| Age | Commit message (Collapse) | Author | Lines |
|
We don't completely cover documentation tests in the testing chapter,
since we cover them in the documentation chapter. So make sure people
know that.
Fixes #28082
|
|
Fixes #28359
|
|
The original blog post referred to examples by their file names, and now
that it's in guide form, there is no file name. So edit the text so that
it makes a bit more sense.
Fixes #28428
|
|
The links in the rustdoc for several places in fmt were trying to link to
the std::fmt module but actually linking to std, which was confusing.
While trying to figure out why I noticed that the documentation chapter of
the Rust book has examples that show this same bug (although it doesn't seem
widespread in practice).
|
|
This is part of #28572, but doesn't complete it. Amongst other things,
this patch:
* Increases consistency in the way feature flags are used with other
docs.
* Removes the ignores, which is nice: we actually had some syntax errors
in the examples :sob:.
* Mentions #![no_core]
Realistically, this document used to be in the order of least to most:
nothing, then adding core. But with the changes in RFC 1184, this is
backwards: it now shows stuff that uses core from the beginning. In the
future, I'd like to revamp this to go from 'most to least', but I'd like
to see the discussion in https://github.com/rust-lang/rust/issues/27701
goes before I write more.
|
|
|
|
- Expand the first paragraph
- Improve readability by partitioning the chapter into the following
sections: "Patterns", "Type annotations", "Mutability", and
"Initializing bindings"
- Add "Scope and shadowing" section (fix #28177)
|
|
|
|
This was non-obvious to me: with no example, I assumed `Electron {}` and
didn't know what else to try when it didn't work. The correct form is
weird because it looks like you're assigning the struct name rather than
an instance of the struct.
r? @steveklabnik
|
|
This was non-obvious to me: with no example, I assumed `Electron {}` and
didn't know what else to try when it didn't work. The correct form is
weird because it looks like you're assigning the struct name rather than
an instance of the struct.
|
|
the example for `find` was misleading in that it fails to mention the result is either `None` or `Some` containing only the first match. Further confusing the issue is the `println!` statement, "We got some numbers!"
|
|
|
|
r? @steveklabnik
|
|
|
|
|
|
|
|
|
|
r? @steveklabnik
|
|
|
|
This changes how rustic generate `id` and `href` attributes for section header anchor. Now they are more github-like.
Also fixes breakage in docs caused by this and broken links in "Error Handling" section of book.
r? @steveklabnik
cc @alexcrichton
|
|
|
|
This is a simple grammar fix in which the previous author accidentally repeated a word when (s)he shouldn't have.
|
|
Fixes #28458
Details about `Arc` may be too soon to be described together with `Sync`... Tell me what you think.
r? @steveklabnik
|
|
|
|
|
|
|
|
In code like `let x = 5`, I am initially confused as to the meaning of "let doesn't take a name on the left hand side, it actually accepts a pattern." - I interpret that as the pattern being located as: `<pattern> let [...]`.
I think what is meant is that the name/pattern is on the left hand side *of the assignment*, rather than to the left of the *let* statement. This change clarifies that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.
|
|
|
|
r? @steveklabnik
|
|
Using "later" in this context makes more sense than "greater" so it's been changed to match the Linux requirement above it rather than the other way around.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
|
|
r=steveklabnik
This was @steveklabnik's idea. Thanks @BurntSushi for the awesome blog post!
r? @steveklabnik
|