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 7 pull requests #34939

Merged
merged 26 commits into from
Jul 21, 2016
Merged

Rollup of 7 pull requests #34939

merged 26 commits into from
Jul 21, 2016

Conversation

GuillaumeGomez and others added 13 commits July 16, 2016 18:00
Right now two MIPS targets in the compiler, `mips-unknown-linux-{gnu,musl}` both
generate object files using the soft-float ABI through LLVM by default. This is
also expressed as the `-C soft-float` codegen option and otherwise isn't used
for any other target in the compiler. This option was added quite some time ago
(back in rust-lang#9617), and nowadays it's more appropriate to be done through a codegen
option.

This is motivated by rust-lang#34743 which necessitated an upgrade in the CMake
installation on our bots which necessitated an upgrade in the Ubuntu version
which invalidated the MIPS compilers we were using. The new MIPS compilers
(coming from Debian I believe) all have hard float enabled by default and soft
float support not built in. This meant that we couldn't upgrade the bots
until rust-lang#34841 landed because otherwise we would fail to compile C code as the
`-msoft-float` option wouldn't work.

Unfortunately, though, this means that once we upgrade the bots the C code we're
compiling will be compiled for hard float and the Rust code will be compiled
for soft float, a bad mismatch! This PR remedies the situation such that Rust
will compile with hard float as well.

If this lands it will likely produce broken nightlies for a day or two while we
get around to upgrading the bots because the current C toolchain only produces
soft-float binaries, and now rust will be hard-float. Hopefully, though, the
upgrade can go smoothly!
@rust-highfive
Copy link
Collaborator

r? @brson

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

@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented Jul 20, 2016

📌 Commit a408564 has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jul 20, 2016

⌛ Testing commit a408564 with merge c1bb843...

seanmonstar and others added 2 commits July 20, 2016 15:54
core: impl From<T> for Option<T>

First, the semantics of this `impl` seem spot on. If I have a value `T`, and I wish to make a `Option<T>`, then `Option::from(val)` should always give `Some(val)`.

Second, this allows improvement for several APIs that currently take `Option<T>` as arguments. Consider:

```rust
fn set_read_timeout(&mut self, timeout: Option<u32>) {
    // ...
}

x.set_read_timeout(Some(30));
x.set_read_timeout(Some(10));
x.set_read_timeout(None);
```

With this `impl`:

```rust
fn set_read_timeout<T: Into<Option<u32>>>(&mut self, timeout: T) {
    let timeout = timeout.into();
    // ...
}

x.set_read_timeout(30);
x.set_read_timeout(10);
x.set_read_timeout(Some(10)); // backwards compatible
x.set_read_timeout(None);
```

The change to those methods aren't included, but could be modified later.

r? @sfackler
Make .enumerate() example self-explanatory

Should resolve rust-lang#34624
implement AddAssign for String

Currently `String` implements `Add` but not `AddAssign`. This PR fills in that gap.

I played around with having `AddAssign` (and `Add` and `push_str`) take `AsRef<str>` instead of `&str`, but it looks like that breaks arguments that implement `Deref<Target=str>` and not `AsRef<str>`. Comments in [`libcore/convert.rs`](https://github.com/rust-lang/rust/blob/master/src/libcore/convert.rs#L207-L213) make it sound like we could fix this with a blanket impl eventually. Does anyone know what's blocking that?
rustc: Remove soft-float from MIPS targets

Right now two MIPS targets in the compiler, `mips-unknown-linux-{gnu,musl}` both
generate object files using the soft-float ABI through LLVM by default. This is
also expressed as the `-C soft-float` codegen option and otherwise isn't used
for any other target in the compiler. This option was added quite some time ago
(back in rust-lang#9617), and nowadays it's more appropriate to be done through a codegen
option.

This is motivated by rust-lang#34743 which necessitated an upgrade in the CMake
installation on our bots which necessitated an upgrade in the Ubuntu version
which invalidated the MIPS compilers we were using. The new MIPS compilers
(coming from Debian I believe) all have hard float enabled by default and soft
float support not built in. This meant that we couldn't upgrade the bots
until rust-lang#34841 landed because otherwise we would fail to compile C code as the
`-msoft-float` option wouldn't work.

Unfortunately, though, this means that once we upgrade the bots the C code we're
compiling will be compiled for hard float and the Rust code will be compiled
for soft float, a bad mismatch! This PR remedies the situation such that Rust
will compile with hard float as well.

If this lands it will likely produce broken nightlies for a day or two while we
get around to upgrading the bots because the current C toolchain only produces
soft-float binaries, and now rust will be hard-float. Hopefully, though, the
upgrade can go smoothly!
Rewrite/expand doc examples for `Vec::set_len`.

None
Add doc examples for `Vec::{as_slice,as_mut_slice}`.

None
…, r=apasel422

Add debug for hash_map::{Entry, VacantEntry, OccupiedEntry}

r? @alexcrichton
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented Jul 21, 2016

📌 Commit 22a14a8 has been approved by GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jul 21, 2016

⌛ Testing commit 22a14a8 with merge 7588653...

bors added a commit that referenced this pull request Jul 21, 2016
Rollup of 7 pull requests

- Successful merges: #34854, #34855, #34880, #34895, #34911, #34921, #34930
- Failed merges: #33951, #34850
@bors bors merged commit 22a14a8 into rust-lang:master Jul 21, 2016
@GuillaumeGomez GuillaumeGomez deleted the rollup branch July 21, 2016 17:22
@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.