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 9 pull requests #45907

Merged
merged 24 commits into from
Nov 10, 2017
Merged

Rollup of 9 pull requests #45907

merged 24 commits into from
Nov 10, 2017

Conversation

kennytm and others added 24 commits November 6, 2017 03:53
Rationale:

We use --quiet mode when testing a PR in the CI. Also, we use `stamp` to
prefix every line with a timestamp. Previously, when testing in --quiet
mode, we will only print a dot for each test without any line breaks.
Combined with `stamp`, this means we'd need to wait for all tests to
complete before writing the output. On Travis CI, if we don't print
anything within 30 minutes, the job will be forcefully canceled. This
makes it very easy to spuriously-timeout when testing non-default images
like arm-android using the CI. This commit tries to workaround the issue
by printing a new line every 100 dots, forcing `stamp` to emit something
to reset Travis's countdown.
This commit reverts rust-lang#45734 and applies rust-lang#45744. We expect the vault links
to be more stable than mirror.centos.org.
This is intended to prevent the spurious OOM error from
run-pass/rustc-rust-log.rs, by skipping the output in the middle when the
size is over 416 KB, so that the log output will not be overwhelmed.
On the case of duplicated names caused by an `extern crate` statement
with a rename, don't include the inline suggestion, instead using a span
label with only the text to avoid incorrect rust code output.
I'm really new to Rust, this is the first thing I've ever actually pushed to github in a rust project, so please double check that it's correct.  I noticed that the in-doc example for the string's get() function was referring to get_mut().  Looks like a copy/paste issue.

```rust
fn main() {
    let v = String::from("🗻∈🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
```
results in:
```
jhford-work:~/rust/redish $ cat get-example.rs
fn main() {
    let v = String::from("🗻∈🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
jhford-work:~/rust/redish $ rustc get-example.rs
jhford-work:~/rust/redish $ ./get-example ; echo $?
0
```

I did not build an entire rust toolchain as I'm not totally sure how to do that.
…crichton

Miscellaneous changes for CI, Docker and compiletest.

This PR contains 7 independent commits that improves interaction with CI, Docker and compiletest.

1. a4e5c91 — Forces a newline every 100 dots when testing in quiet mode. Prevents spurious timeouts when abusing the CI to test Android jobs.

2. 1b5aaf2 — Use vault.centos.org for dist-powerpc64le-linux, see rust-lang#45744.

3. 33400fb — Modify `src/ci/docker/run.sh` so that the docker images can be run from Docker Toolbox for Windows on Windows 7. I haven't checked the behavior of the newer Docker for Windows on Windows 10. Also, "can run" does not mean all the test can pass successfully (the UDP tests failed last time I checked)

4. d517668 — Don't emit a real warning the linker segfault, which affects UI tests like rust-lang#45489 (comment). Log it instead.

5. 51e2247 — During run-pass, trim the output if stdout/stderr exceeds 416 KB (top 160 KB + bottom 256 KB). This is an attempt to avoid spurious failures like rust-lang#45384 (comment)

6. 9cfdaba — Force `gem update --system` before deploy. This is an attempt to prevent spurious error rust-lang#44159.

7. eee10cc — Tries to print the crash log on macOS on failure. This is an attempt to debug rust-lang#45230.
Fix help for duplicated names: `extern crate (...) as (...)`

On the case of duplicated names caused by an `extern crate` statement
with a rename, don't include the inline suggestion, instead using a span
label with only the text to avoid incorrect rust code output.

Fix rust-lang#45829.
…r=dtolnay

Add `Option::filter()` according to RFC 2124

(*old PR: rust-lang#44996)

This is the implementation of [RFC "Add `Option::filter` to the standard library"](rust-lang/rfcs#2124). Tracking issue: rust-lang#45860

**Questions for code reviewers:**

- Is the documentation sufficiently long?
- Is the documentation easy enough to understand?
- Is the position of the new method (after `and_then()`) a good one?
Add missing example for Debug trait

r? @rust-lang/docs
…nnytm

get() example should use get() not get_mut()

I'm really new to Rust, this is the first thing I've ever actually pushed to github in a rust project, so please double check that it's correct.  I noticed that the in-doc example for the string's get() function was referring to get_mut().  Looks like a copy/paste issue.

```rust
fn main() {
    let v = String::from("🗻∈🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
```
results in:
```
jhford-work:~/rust/redish $ cat get-example.rs
fn main() {
    let v = String::from("🗻∈🌏");

    assert_eq!(Some("🗻"), v.get(0..4));

    // indices not on UTF-8 sequence boundaries
    assert!(v.get(1..).is_none());
    assert!(v.get(..8).is_none());

    // out of bounds
    assert!(v.get(..42).is_none());
}
jhford-work:~/rust/redish $ rustc get-example.rs
jhford-work:~/rust/redish $ ./get-example ; echo $?
0
```

I did not build an entire rust toolchain as I'm not totally sure how to do that.
fix core for targets with max-atomic-width = 0

closes rust-lang#45802

cc @kennytm
…tolnay

Allow a trailling comma in assert_eq/ne macro

From Rust beginners IRC:

<???> It sure does annoy me that assert_eq!() does not accept a trailing comma after the last argument.
<???> ???: File an issue against https://github.com/rust-lang/rust and CC @rust-lang/libs

Figured that might as well submit it. Will become insta-stable after merging (danger zone).

cc @rust-lang/libs
add a bunch of debug logging to MIR inlining

r? @eddyb

@bors rollup
Fix typo in -Zsaturating-float-casts test
@kennytm
Copy link
Member Author

kennytm commented Nov 10, 2017

@bors r+ p=9

@bors
Copy link
Contributor

bors commented Nov 10, 2017

📌 Commit 6a9931c has been approved by kennytm

@bors
Copy link
Contributor

bors commented Nov 10, 2017

⌛ Testing commit 6a9931c with merge c0d326f...

bors added a commit that referenced this pull request Nov 10, 2017
Rollup of 9 pull requests

- Successful merges: #45783, #45856, #45863, #45869, #45878, #45882, #45887, #45895, #45901
- Failed merges:
@bors
Copy link
Contributor

bors commented Nov 10, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing c0d326f to master...

@bors bors merged commit 6a9931c into rust-lang:master Nov 10, 2017
@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.

10 participants