| Age | Commit message (Collapse) | Author | Lines |
|
Make .enumerate() example self-explanatory
Should resolve #34624
|
|
|
|
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
|
|
|
|
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
|
|
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
|
|
|
|
|
|
enhancewindows documentation in getting-started
- minor pronoun fix We -> You
- PATH troubleshooting
- dir output is vertical (but did not include timestamps)
- executables not in %PATH% require .\
r? @steveklabnik
|
|
doc: make the conditional-compilation example work
If not, the error `does not have these features: foo` confused.
r? @steveklabnik
|
|
Correct inline assembly clobber formatting.
Fixes the formatting for inline assembly clobbers used in the book.
As this causes llvm to silently ignore the clobber an error is also
added to catch cases in which the wrong formatting was used.
Additionally a test case is added to confirm that this error works.
This fixes #34458
Note: this is only one out of a few possible ways to fix the issue
depending on how the asm! macro formatting is wanted.
Additionally, it'd be nicer to have some kind of test or feedback
from llvm if the clobber constraints are valid, but I do not know
enough about llvm to say if or how this is possible.
|
|
- minor pronoun fix We -> You
- PATH troubleshooting
- dir output is vertical (but did not include timestamps)
- executables not in %PATH% require .\
|
|
|
|
Add a section about crate documentation.
Fixes #34329
?r @steveklabnik
|
|
Fix typos
|
|
Fix spacing in for loop enumeration example
Add a space between the comma and j in (i, j) to make it look nice.
This addresses my recent issue #34624.
😀
|
|
Clarifies the meaning of the external mutability.
|
|
update cargo doc link
updated proper link of cargo doc that contains details about list of options available in semantic versioninig for the dependencies section in Cargo.toml
|
|
update documentation of tuple/unit structs
I made the "tuple structs are useless" editorializing a bit weaker and moved it to the end. Feel free to overrule me on that.
I also added an example of how to unpack a tuple struct with dot notation, because it came up on IRC.
`braced_empty_structs` is stable now, so I updated the example for unit-like structs to use that syntax. Should we show both ways?
cc @ubsan
r? @steveklabnik or @GuillaumeGomez
|
|
Fixes the formatting for inline assembly clobbers used in the book.
As this causes llvm to silently ignore the clobber an error is also
added to catch cases in which the wrong formatting was used.
Additionally a test case is added to confirm that this error works.
|
|
|
|
Correct use of 'nul' 'null' and capitalization in the book
r? @steveklabnik
|
|
|
|
|
|
|
|
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
|
|
|
|
Add a space between the comma and j in (i, j) to make it look nice.
|
|
|
|
updated proper link of cargo doc that contains details about list of options available in semantic versioninig for the dependencies section in Cargo.toml
|
|
If not, the error `does not have these features: foo` confused.
r? @steveklabnik
|
|
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
|
|
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.
|
|
|
|
|