-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 19 pull requests #35834
Closed
Closed
Rollup of 19 pull requests #35834
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've also removed the `main()` wrapper, which I believe is extraneous. LMK if that's incorrect.
Saying that "[for-loop iteration] fails because .. has no IntoIterator impl" is more direct than saying "...no Iterator impl" because for loops sugar into IntoIterator invocations. It just happens that the other Range* operators implement Iterator and rely on the fact that `IntoIterator` is implemented for `T: Iterator`.
PR rust-lang#35695 for `Range` was approved, so it seems that this side-effect-free style is preferred for Range* examples. This PR performs the same translation for `RangeFrom` and `RangeInclusive`. It also removes what looks to be an erroneously commented line for `#![feature(step_by)]`, and an unnecessary primitive-type annotation in `0u8..`.
Currently most of the operator traits use trivial implementation examples that only perform side effects. Honestly, that might not be too bad for the sake of documentation; but anyway, here's a proposal to move a slightly modified version of the module-level point-addition example into the `Add` documentation, since it's more evocative of addition semantics. Part of rust-lang#29365 wrap identifiers in backticks minor rephrasing fix module-level documentation to be more truthful This branch changes the example for `Add` to no longer be a "minimum implementation that prints something to the screen".
Changed datastructure to data structure
* `std::ffi::OsStr::new`. * `std::ffi::OsStr::is_empty`. * `std::ffi::OsStr::len`.
Vector-scalar multipication is a good usecase for this. Thanks #rust!
Part of rust-lang#29365 explain that std::mem::drop in prelude will invoke Drop change "prelude" -> "the prelude"; change links to reference-style move link references to links' section
This is analogous to PR rust-lang#35709 for the `Add` trait.
…ror, r=steveklabnik explicitly show how iterating over `..` fails I've also removed the `main()` wrapper, which I believe is extraneous. LMK if that's incorrect.
…=GuillaumeGomez replace `Add` example with something more evocative of addition Currently most of the operator traits use trivial implementation examples that only perform side effects. Honestly, that might not be too bad for the sake of documentation; but anyway, here's a proposal to move a slightly modified version of the module-level point-addition example into the `Add` documentation, since it's more evocative of addition semantics. Part of rust-lang#29365
…veklabnik note that calling drop() explicitly is a compiler error Part of rust-lang#29365
…tln-remaining, r=GuillaumeGomez accumulate vector and assert for RangeFrom and RangeInclusive examples PR rust-lang#35695 for `Range` was merged, so it seems that this side-effect-free style is preferred for Range* examples. This PR performs the same translation for `RangeFrom` and `RangeInclusive`. It also removes what looks to be an erroneously commented line for `#![feature(step_by)]`, and an unnecessary primitive-type annotation in `0u8..`.
…llaumeGomez Add a few doc examples for `std::ffi::OsStr`.
… r=jonathandturner updated E0395 to new error format Updated E0395 to new error format. Part of rust-lang#35233 Fixes rust-lang#35693 Thanks again for letting me help! r? @jonathandturner
…=jonathandturner updated E0396 to new error format Updated E0396 to new error format. Part of rust-lang#35233 Fixes rust-lang#35779 Thanks again for letting me help! r? @jonathandturner
Very minor spelling fix in the book Changed datastructure to data structure. r? @steveklabnik
Fix minor typo Minor typo in the book.
…steveklabnik demonstrate `RHS != Self` use cases for `Mul` and `Div` Vector-scalar multipication is a good usecase for this. Thanks #rust!
Update error message for E0084 Fixes rust-lang#35792 as part of rust-lang#35233 r? @jonathandturner
…=steveklabnik replace `AddAssign` example with something more evocative of addition This is analogous to PR rust-lang#35709 for the `Add` trait.
…on_test, r=alexcrichton Add workaround to detect correct compiler version This adds a workaround which fixes a rustbuild issue where the wrong compiler is checked for the version number. The bug would arise if you build the system correctly then changed to any other version (eg doing a `git pull`). After changing to the new version, building would fail and complain that crates were built with the wrong compiler. There are actually two compilers at play, the bootstrapping compiler (called the "snapshot" compiler) and the actual compiler being built (the "real" compiler). In the case of this issue, the wrong compiler was being checked for version mismatch. r? @alexcrichton
Update error format for E0232 Fixes rust-lang#35795, as part of rust-lang#35233. Excited to make my first contribution to rustc! r? @jonathandturner
Fix label messages for E0133 Issue rust-lang#35789
…ndturner Err codes r? @jonathandturner
…klabnik replace `Not` example with something more evocative
…klabnik replace `Neg` example with something more evocative of negation
Update E0428 to new format Fixes rust-lang#35798 as part of rust-lang#35233. r? @jonathandturner
@bors r+ p=1 |
📌 Commit 7f75382 has been approved by |
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
⌛ Testing commit 7f75382 with merge 402a97e... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
..
fails #35701, replaceAdd
example with something more evocative of addition #35709, note that calling drop() explicitly is a compiler error #35710, accumulate vector and assert for RangeFrom and RangeInclusive examples #35758, Add a few doc examples forstd::ffi::OsStr
. #35775, updated E0395 to new error format #35778, updated E0396 to new error format #35780, Very minor spelling fix in the book #35781, Fix minor typo #35794, demonstrateRHS != Self
use cases forMul
andDiv
#35800, Update error message for E0084 #35804, replaceAddAssign
example with something more evocative of addition #35806, Add workaround to detect correct compiler version #35811, Update error format for E0232 #35812, Fix label messages for E0133 #35818, Err codes #35824, replaceNot
example with something more evocative #35827, replaceNeg
example with something more evocative of negation #35830, Update E0428 to new format #35831