Skip to content
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 13 pull requests #35826

Closed
wants to merge 26 commits into from
Closed

Rollup of 13 pull requests #35826

wants to merge 26 commits into from

Conversation

matthew-piziak and others added 26 commits August 17, 2016 18:53
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`.
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
…=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
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
Fix minor typo

Minor typo in the book.
…=steveklabnik

replace `AddAssign` example with something more evocative of addition

This is analogous to PR rust-lang#35709 for the `Add` trait.
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
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@sophiajt
Copy link
Contributor Author

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Aug 19, 2016

📌 Commit d2e1502 has been approved by jonathandturner

@bors
Copy link
Contributor

bors commented Aug 19, 2016

⌛ Testing commit d2e1502 with merge 50df672...

@bors
Copy link
Contributor

bors commented Aug 19, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@sophiajt
Copy link
Contributor Author

Rerolling...

@sophiajt sophiajt closed this Aug 19, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.