| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
r? @steveklabnik
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Rename main thread from "<main>" to "main".
Fix issue #33789
We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
|
|
|
|
|
|
Links to directories and direct links to doc.rust-lang.org don't work properly
when viewing the docs offline so fix them.
|
|
Fixed link in Rust Book (no-stdlib)
Closes #33806
|
|
Fix references links
There are duplicate link references in the article and just remove one of them.
|
|
Fix a broken link in the rust book.
|
|
Fix issue #33789
|
|
|
|
book: ownership: fix typo
The sentence ends there, so a comma is required.
See:
http://english.stackexchange.com/questions/1469/when-ending-a-list-with-etc-should-there-be-a-comma-before-etc
|
|
Clarify the English translation of `?Sized`
* It wasn't clear whether `?Sized` meant "not `Sized`" or "`Sized` or not `Sized`". According to #rust IRC, it does indeed mean "`Sized` or not `Sized`".
* Use the same language as [Trait std::marker::Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html) about how `Sized` is implicitly bound.
* Refer to the syntax as `?Sized`, since it's currently the only allowed trait that can follow `?`.
|
|
Book: small improvement to a table to make it clearer
This table is used as an example of four heap values where two of them got deallocated leaving a gap.
It also has stack variables.
Instead of four stack variables I propose three, that way there's no misleading connection between the number of stack variables and heap variables.
But more importantly: three of the four stack variables had the same name (**y**) which could be confusing to a beginner, I changed this as well.
|
|
* Use "special bound syntax" instead of "special syntax". `?Sized` is technically a "bound", but `?Sized` is specialized syntax that _only_ works with `Sized`, and no other Trait.
* Replace "constant size" with "sized".
|
|
There are Duplicate link references in the article and the format is incorrect.
|
|
Clarify wording in `transmute` example
* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
|
|
|
|
|
|
|
|
* It wasn't clear whether `?Sized` meant "not `Sized`" or "`Sized` or not `Sized`". According to #rust IRC, it does indeed mean "`Sized` or not `Sized`".
* Use the same language as [Trait std::marker::Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html) about how `Sized` is implicitly bound.
|
|
* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
|
|
|
|
Rust syntax coloring for some ignore, should-panic and no-run snippets.
In the book, some code blocks were missing the `rust` specifier which is needed for them to highlight correctly.
|
|
Clarified that `let(mut x, y) =` only makes x mutable, not y
Closes #33716
|
|
|
|
|
|
|