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 14 pull requests #56186

Merged
merged 36 commits into from
Nov 23, 2018
Merged

Rollup of 14 pull requests #56186

merged 36 commits into from
Nov 23, 2018

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Nov 23, 2018

Successful merges:

Failed merges:

r? @ghost

dralley and others added 30 commits November 9, 2018 23:00
A rust-enabled gdb already knows how to display string slices,
structs, tuples, and enums (and after rust-lang#54004, the pretty-printers
can't handle enums at all).  This patch disables these pretty-printers
when gdb is rust-enabled.

The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed,
because it does not seem to depend on any behavior of that version of
gdb, and because gdb 7.7 is 4 years old now.
Fix missing ',' array element separators and convert NaN's to 0.
Hopefully will speed up CI slightly!
This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
It used to point to the implementation PR.
…, r=alexcrichton

Disable some pretty-printers when gdb is rust-enabled

A rust-enabled gdb already knows how to display string slices,
structs, tuples, and enums (and after rust-lang#54004, the pretty-printers
can't handle enums at all).  This patch disables these pretty-printers
when gdb is rust-enabled.

The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed,
because it does not seem to depend on any behavior of that version of
gdb, and because gdb 7.7 is 4 years old now.
Fix #[cfg] for step impl on ranges

```#[cfg(target_pointer_witdth = ...)]``` is misspelled
Add std::iter::unfold

This adds an **unstable** ~`std::iter::iterate`~ `std::iter::unfold` function and ~`std::iter::Iterate`~ `std::iter::Unfold` type that trivially wrap a ~`FnMut() -> Option<T>`~ `FnMut(&mut State) -> Option<T>` closure to create an iterator. ~Iterator state can be kept in the closure’s environment or captures.~

This is intended to help reduce amount of boilerplate needed when defining an iterator that is only created in one place. Compare the existing example of the `std::iter` module: (explanatory comments elided)

```rust
struct Counter {
    count: usize,
}

impl Counter {
    fn new() -> Counter {
        Counter { count: 0 }
    }
}

impl Iterator for Counter {
    type Item = usize;

    fn next(&mut self) -> Option<usize> {
        self.count += 1;
        if self.count < 6 {
            Some(self.count)
        } else {
            None
        }
    }
}
```

… with the same algorithm rewritten to use this new API:

```rust
fn counter() -> impl Iterator<Item=usize> {
    std::iter::unfold(0, |count| {
        *count += 1;
        if *count < 6 {
            Some(*count)
        } else {
            None
        }
    })
}
```

-----

This also add unstable `std::iter::successors` which takes an (optional) initial item and a closure that takes an item and computes the next one (its successor).

```rust
let powers_of_10 = successors(Some(1_u16), |n| n.checked_mul(10));
assert_eq!(powers_of_10.collect::<Vec<_>>(), &[1, 10, 100, 1_000, 10_000]);
```
…ichaelwoerister

Ensure that the argument to `static_assert` is a `bool`

cc @eddyb
…i-obk

When popping in CTFE, perform validation before jumping to next statement to have a better span for the error

Currently, when validating the return value fails, the span points at the next statement after the call. That does not make much sense.

r? @oli-obk
Add rustc_codegen_ssa to sysroot

Outside of rustc you are currently unable to use it.

r? @nikomatsakis (because you r+'ed rust-lang#55627)
… r=petrochenkov

Fix json output in the self-profiler

Fix missing ',' array element separators and convert NaN's to 0.

cc @Mark-Simulacrum
Fix invalid bitcast taking bool out of a union represented as a scalar

As reported in rust-lang#54668 (comment)
ci: Download clang/lldb from tarballs

Hopefully will speed up CI slightly!
Add unstable Literal::subspan().

Take 2 of rust-lang#55971. Still ~wrong, but now with a comment! (and less of a surface) Unblocks rust-lang#49219.

r? @alexcrichton
…excrichton

Pass additional linker flags when targeting Fuchsia

This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
…, r=pietroalbini

[master] Backport 1.30.1 release notes

Fixes rust-lang#56135

r? @ghost
Fix the tracking issue for hash_raw_entry

It used to point to the implementation PR.
@kennytm
Copy link
Member Author

kennytm commented Nov 23, 2018

@bors r+ p=14

@bors
Copy link
Contributor

bors commented Nov 23, 2018

📌 Commit 36189a2 has been approved by kennytm

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 23, 2018
@bors
Copy link
Contributor

bors commented Nov 23, 2018

⌛ Testing commit 36189a2 with merge 1f57e48...

bors added a commit that referenced this pull request Nov 23, 2018
Rollup of 14 pull requests

Successful merges:

 - #55767 (Disable some pretty-printers when gdb is rust-enabled)
 - #55838 (Fix #[cfg] for step impl on ranges)
 - #55869 (Add std::iter::unfold)
 - #55945 (Ensure that the argument to `static_assert` is a `bool`)
 - #56022 (When popping in CTFE, perform validation before jumping to next statement to have a better span for the error)
 - #56048 (Add rustc_codegen_ssa to sysroot)
 - #56091 (Fix json output in the self-profiler)
 - #56097 (Fix invalid bitcast taking bool out of a union represented as a scalar)
 - #56116 (ci: Download clang/lldb from tarballs)
 - #56120 (Add unstable Literal::subspan().)
 - #56154 (Pass additional linker flags when targeting Fuchsia)
 - #56162 (std::str Adapt documentation to reality)
 - #56163 ([master] Backport 1.30.1 release notes)
 - #56168 (Fix the tracking issue for hash_raw_entry)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Nov 23, 2018

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

@bors bors merged commit 36189a2 into rust-lang:master Nov 23, 2018
@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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.