| Age | Commit message (Collapse) | Author | Lines |
|
Update glossary.md
Added a brief description of Combinators
|
|
Book: Small grammatical and stylistic edits to book
I've been reading [the book](https://doc.rust-lang.org/book/) and noticed a few small grammatical and stylistic issues which I've rolled into this pull request.
I'm not sure if I should do so many small, unrelated edits in a single pull request but it seems like a lot of overhead for each small edit. Maybe one commit per edit but one pull request per file/section? Feedback is very much appreciated as this is my first pull request ever!
r? @steveklabnik rollup
|
|
Added a brief description of Combinators
|
|
|
|
|
|
no reason for a long comment in a code block when we could take it out, especially since it looks like it's using markdown (`struct`, `&` and `lvl`).
|
|
two terms (input lifetime and output lifetime) so "term" needs to be plural.
|
|
[doc] Fix links in Ownership section of the book
- Add a missing link definition for `[i32]`.
- Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.
|
|
Traits where syntax's extra usage example more clearly
r? @steveklabnik
|
|
update reference for #29734
|
|
Syntax coloring and more compact diagram
Two cosmetic improvements:
- New content was added a few days ago to the **Closures** chapter but it was missing rust's syntax coloring.
- Also, in the **Crates and Modules** chapter, a diagram was improved to be more symmetric and to take less space.
|
|
grammatical: "Here's" should be "Here are", "rules" is plural.
stylistic: "rules for" is more idiomatic than "rules about".
grammatical: No verb in "One or the other"; changed to "It's one or the other".
code: added implied `fn main() { ... }` because it is referenced in "note: previous borrow ends here"
semantic: "But" seems like the wrong word here, there is now, contrast, only further explanation. "so", "thus" or "therefor" is clearer.
grammatical: Another misuse of "Here's", should be "Here are" (or possibly "Here're").
grammatical: "use" should be capitalized. All other subheadings capitalize the first word.
|
|
Also "to access" is cleaner than "for accessing"
|
|
|
|
|
|
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors). This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes.
As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos). While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
|
|
|
|
|
|
|
|
diagnostics comes from different places now
|
|
|
|
|
|
r? @steveklabnik
|
|
|
|
|
|
|
|
|
|
fix typo in primitive-types section on slices
|
|
|
|
|
|
Note warning of default features on libc
The default features of libc include libstd. This should be noted on this page.
|
|
Remove a gotcha from book/error-handling.md
The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to
`Box<Error>`, so this gotcha and later references to it can now be removed.
r? @steveklabnik
|
|
Rewrote "How Safe and Unsafe Interact" Nomicon chapter.
The previous version of the chapter covered a lot of ground, but was a little meandering and hard to follow at times. This draft is intended to be clearer and more direct, while still providing the same information as the previous version.
r? @steveklabnik
|
|
Implement RFC495 semantics for slice patterns
non-MIR translation is still not supported for these and will happily ICE.
This is a [breaking-change] for many uses of slice_patterns.
[RFC 495 text](https://github.com/rust-lang/rfcs/blob/master/text/0495-array-pattern-changes.md)
|
|
|
|
|
|
Have included an example of a Cargo.toml file containing the libc dependency.
The file has been reformatted to use sections. The note on the default features warning is part of the _Using libc_ section but is in bold.
|
|
Bug/bool colors
This is actually #33661 @steveklabnik, sorry about this, github ate my homework
|
|
Noted that shadowing never destroys a value
Fixes issue #33887
r? @steveklabnik
|
|
Add missing space before parenthesis.
|
|
Minor changes to variable bindings chapter
* In "*... name as another binding, that's currently in scope, will ...*", *"
that's currently in scope"* is not a parenthetical element, and the commas
can be omitted.
* Other minor changes.
|
|
r=steveklabnik
Update reference to indicate stabilization of `deprecated` attribute.
None
|
|
Improved documentation for tests/ directory
This ambigouity problem was already discussed in the [forums](https://users.rust-lang.org/t/problem-using-external-modules-inside-integration-test-submodule/5312/6).
|
|
* In "... name as another binding, that's currently in scope, will ...", ",
that's currently in scope, " is not a parenthetical element, and the commas
can be omitted.
* Other minor changes.
|
|
The default features of libc include libstd. This should be noted on this page.
|
|
The book's "Error handling with Box<Error>" section talks about Box<Error>.
In the actual example Box<Error + Send + Sync> is used instead so that the
corresponding From impls could be used to convert a plain string to an error
type. Rust 1.7 added support for conversion from &str/String to
Box<Error>, so this gotcha and later references to it can now be removed.
|
|
|
|
|
|
|
|
|