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 19 pull requests #35857

Merged
merged 43 commits into from
Aug 20, 2016
Merged

Rollup of 19 pull requests #35857

merged 43 commits into from
Aug 20, 2016

Conversation

matthew-piziak and others added 30 commits August 15, 2016 18:46
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`.
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
rustdoc: remove the `!` from macro URLs and titles

Because the `!` is part of a macro use, not the macro's name. E.g., you write `macro_rules! foo` not `macro_rules! foo!`, also `#[macro_import(foo)]`.

(Pulled out of rust-lang#35020).
…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
…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
Jonathan Turner added 13 commits August 20, 2016 07:09
…=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!
…=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
…klabnik

replace `Not` example with something more evocative
…klabnik

replace `Neg` example with something more evocative of negation
Wording fixes in error messages

This PR is largely wording fixes to existing PRs that I found going back through the ones that have already been updated.  Sometimes seeing the message in context made me think "oh there's a better wording!"

There's one additional fix.  This will also prevent the secondary underlining of derive call (since they look like macros to the system in the way I was using):

```
error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor
  --> src/test/compile-fail/E0184.rs:11:10
   |
11 | #[derive(Copy)] //~ ERROR E0184
   |          ^^^^
   |          |
   |          in this macro invocation
```

Is now just:

```
error[E0184]: the trait `Copy` may not be implemented for this type; the type has a destructor
  --> src/test/compile-fail/E0184.rs:11:10
   |
11 | #[derive(Copy)] //~ ERROR E0184
   |          ^^^^
```
@sophiajt
Copy link
Contributor Author

@bors r+ p=1

@rust-highfive
Copy link
Collaborator

r? @brson

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

@bors
Copy link
Contributor

bors commented Aug 20, 2016

📌 Commit 9072861 has been approved by jonathandturner

@bors
Copy link
Contributor

bors commented Aug 20, 2016

⌛ Testing commit 9072861 with merge 4901896...

bors added a commit that referenced this pull request Aug 20, 2016
1 similar comment
@bors bors merged commit 9072861 into rust-lang:master Aug 20, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 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.