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 #36220

Closed
wants to merge 30 commits into from
Closed

Rollup of 13 pull requests #36220

wants to merge 30 commits into from

Conversation

QuietMisdreavus and others added 30 commits August 17, 2016 14:32
This pull request adds a module-level example of how all the range operators work. It also slims down struct-level examples in lieu of a link to module examples.

add feature for inclusive_range_syntax

fix incorrectly closed code fences
I can no longer find these methods in nightly docs.
Previously we didn't normalize the function signatures used for
closures. This didn't cause a problem in most cases, but caused an ICE
in during MIR type checking.

Fixes rust-lang#36139
Currently it checks only the first argument.

Fixes rust-lang#31216
We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
… r=Manishearth

Add `must_use` to the Reference

I'm a bit uncertain about the exact phrasing, but having it mentioned at all is probably better than before.
…les, r=steveklabnik

refactor range examples

This pull request adds a module-level example of how all the range operators work. It also slims down struct-level examples in lieu of a link to module examples.
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
…klabnik

add links to interesting items in `std::ptr` documentation

Part of rust-lang#29371.

r? @steveklabnik
…teveklabnik

Document try!'s error conversion behaviour

try!'s documentation currently doesn't document the error conversion behaviour of the macro. This patch extends the documentation.

Open questions:
* is it worthwhile to have seperate examples with and without wrapping behaviour? It's not immediately obvious that From<T> for T is always defined. Though this is necessary for the macro to work in any case, is this the place to expect that knowledge.
Normalize the function signature of closures

Previously we didn't normalize the function signatures used for
closures. This didn't cause a problem in most cases, but caused an ICE
in during MIR type checking.

Fixes rust-lang#36139

r? @eddyb
…nikomatsakis

Update lifetime errors to specifically note temporaries

This PR updates the error message we give in the case of a temporary value not living long enough.

Before:

<img width="497" alt="screen shot 2016-08-31 at 10 02 47 am" src="https://cloud.githubusercontent.com/assets/547158/18138551/27a06794-6f62-11e6-9ee2-bdf8bed75ca7.png">

Now:

<img width="488" alt="screen shot 2016-08-31 at 10 03 01 am" src="https://cloud.githubusercontent.com/assets/547158/18138557/2e5cf322-6f62-11e6-9047-4a78abf3d78c.png">

Specifically, it makes the following changes:

* Detects if a temporary is being used.  If so, it changes the labels to mention that a temporary value specifically is in question
* Simplifies wording of the existing labels to focus on lifetimes rather than values being valid
* Changes the help to a note, since the help+span wasn't as helpful (and sometimes more confusing) than just a note.

r? @nikomatsakis
…ikomatsakis

Special case a few colors for Windows

As brought up on [this thread](rust-lang#33240 (comment)) the colors used in error messages on Windows can be difficult to read because of the lack of bold.

This PR makes a few changes to improve readability, namely:
* Rather than using BRIGHT_BLUE, on Windows we now use BRIGHT_CYAN, which is easier to read on black when you do not have bold
* We used BRIGHT_YELLOW rather than YELLOW, for the same reason
* Titles will be BRIGHT_WHITE now, to give the illusion of being bold

Some examples:

![warning](https://cloud.githubusercontent.com/assets/547158/18148466/9aa9bbe2-6f8e-11e6-927f-d0eec53cac32.PNG)

![error](https://cloud.githubusercontent.com/assets/547158/18148488/ba9fb186-6f8e-11e6-8d8e-e93d569f61de.PNG)

r? @nikomatsakis

cc @retep998
Transition Travis CI to use rustbuild.
configure: check if any of the arguments contain --help

Currently it checks only the first argument.

Fixes rust-lang#31216
test: Add a min-llvm-version directive

We've got tests which require a particular version of LLVM to run as they're
testing bug fixes. Our build system, however, supports multiple LLVM versions,
so we can't run these tests on all LLVM versions.

This adds a new `min-llvm-version` directive for tests so they can opt out of
being run on older versions of LLVM. This then namely applies that logic to the
`issue-36023.rs` test case and...

Closes rust-lang#36138
…rner

Fixed E0529's label and unit test

Fixes rust-lang#36195 part of rust-lang#35233.

This is ready for review, but will likely fail Travis due to rust-lang#36138. I changed the wording of the label, so feedback on that would be appreciated.

r? @jonathandturner
@sophiajt
Copy link
Contributor Author

sophiajt commented Sep 2, 2016

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Sep 2, 2016

📌 Commit ec291dc has been approved by jonathandturner

@rust-highfive
Copy link
Collaborator

r? @brson

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

@frewsxcv
Copy link
Member

frewsxcv commented Sep 2, 2016

Tests failed.

failures:
---- ops::RangeToInclusive_2 stdout ----
    error: inclusive range syntax is experimental (see issue #28237)
 --> <anon>:5:17
  |
5 | assert_eq!(arr[ ...2], [0, 1, 2]);
  |                 ^^^^
  |
  = help: add #![feature(inclusive_range_syntax)] to the crate attributes to enable
error: aborting due to previous error(s)
thread 'ops::RangeToInclusive_2' panicked at 'Box<Any>', src/librustc/session/mod.rs:170
note: Run with `RUST_BACKTRACE=1` for a backtrace.
failures:
    ops::RangeToInclusive_2
test result: FAILED. 1051 passed; 1 failed; 12 ignored; 0 measured
error: test failed

@TimNN
Copy link
Contributor

TimNN commented Sep 2, 2016

Looks like #35759, that PR had the same failure.

@steveklabnik
Copy link
Member

@bors: r-

@sophiajt sophiajt closed this Sep 2, 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.