| Age | Commit message (Collapse) | Author | Lines |
|
book: fix formatting of module layout example
|
|
book: update example patterns to be more clear
When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
|
|
When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
|
|
|
|
Add the unstable `:` colon and `<-` inplace operators.
|
|
Fix precedence table in reference
Adds `..` and `...` and puts them above `=`
r? @steveklabnik
|
|
Update the-stack-and-the-heap.md
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
|
|
Provide more explicit example of wildcard version in guessing game doc.
Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning. Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token. Make the correct
format more explicit, to remove one potential source of frustration.
|
|
|
|
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
|
|
|
|
Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning. Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token. Make the correct
format more explicit, to remove one potential source of frustration.
|
|
Properly feature gate all unstable ABIs
Fixes https://github.com/rust-lang/rust/issues/34900
[breaking-change]
r? @pnkfelix
---
Function-visiting machinery for AST/HIR is surprisingly error-prone, it's *very* easy to miss some cases or visit something twice while writing a visitor. This is the true problem behind https://github.com/rust-lang/rust/issues/34900. I'll try to restructure these visitors a bit and send one more PR later.
|
|
Try to clear up some awkward wording
|
|
|
|
even though that is how it works
|
|
|
|
|
|
|
|
|
|
Not sure the example is going to stay, but I can try to pass Travis for the bragging rights.
|
|
|
|
|
|
|
|
|
|
|
|
Expand the "nullable pointer optimization" section with a code example.
Change examples to use std::os::raw instead of libc, when applicable.
|
|
doc/book/trait-objects: remove empty lines at start of examples
I think it looks better without them.
|
|
Update underscore usage (#34903)
|
|
doc: add missing pause
|
|
Fix ABI string docs in reference.md
|
|
|
|
|
|
|
|
Make .enumerate() example self-explanatory
Should resolve #34624
|
|
|
|
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
|
|
|
|
doc: remove extraneous word
|
|
doc: remove stray comma
|
|
Add missing inline code delimiters around Vec<T>
r? @steveklabnik
|
|
Fix up documentation around no_std
1. Fix the sections in the book to have the correct signatures. I've
also marked them as `ignore`; there's no way to set the `no_std`
feature for libc, so it pulls in the stdlib, so this wasn't even
testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
about language items.
Fixes #33677
r? @alexcrichton
|
|
Add mention to RFC 940 in the Rust Reference.
This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per [RFC 940](https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md)
It also formats the RFCs consistently as RFC XXX instead of RFCXXX.
|
|
|
|
|
|
|
|
1. Fix the sections in the book to have the correct signatures. I've
also marked them as `ignore`; there's no way to set the `no_std`
feature for libc, so it pulls in the stdlib, so this wasn't even
testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
about language items.
Fixes #33677
|
|
r? @steveklabnik
The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know.
So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.
|
|
Fix bugs in macro-expanded statement parsing
Fixes #34543.
This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => {
println!("") println!("")
//^ Semicolons are now required on macro-expanded non-braced macro invocations
//| in statement positions.
let x = 0
//^ Semicolons are now required on macro-expanded `let` statements
//| that are followed by more statements, so this would break.
let y = 0 //< (this would still be allowed to reduce breakage in the wild)
}
fn main() { m!() }
```
r? @eddyb
|
|
Fixed some typos
I believe these are typos?
|