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 10 pull requests #73369

Merged
merged 51 commits into from
Jun 15, 2020
Merged

Rollup of 10 pull requests #73369

merged 51 commits into from
Jun 15, 2020

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

trevyn and others added 30 commits June 7, 2020 11:23
Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
… and unchecked.

Doc tests have been written and the documentation on the error type
updated too.
These lead to inference regressions (mostly in tests) in code that looks
like:

    let socket = std::net::SocketAddrV4::new(std::net::Ipv4Addr::new(127, 0, 0, 1), 8080);
    assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());

That compiles as of stable 1.44.0 but fails in beta with:

    error[E0284]: type annotations needed
     --> src/main.rs:3:41
      |
    3 |     assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
      |                                         ^^^^^ cannot infer type for type parameter `F` declared on the associated function `parse`
      |
      = note: cannot satisfy `<_ as std::str::FromStr>::Err == _`
    help: consider specifying the type argument in the method call
      |
    3 |     assert_eq!(socket, "127.0.0.1:8080".parse::<F>().unwrap());
      |
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Based on the review made by dtolnay.
Add basic support of TcpListerner for HermitCore.
In addition, revise TcpStream to support peer_addr.
stlankes and others added 14 commits June 15, 2020 08:43
…-obk

Use min_specialization in the remaining rustc crates

This adds a lot of `transmute` calls to replace the unsound uses of specialization.
It's ugly, but at least it's honest about what's going on.

cc rust-lang#71420, @RalfJung
…atthewjasper

On recursive ADT, provide indirection structured suggestion
Miri: avoid tracking current location three times

Miri tracks the current instruction to execute in the call stack, but it also additionally has two `TyCtxtAt` that carry a `Span` that also tracks the current instruction. That is quite silly, so this PR uses `TyCtxt` instead, and then uses a method for computing the current span when a `TyCtxtAt` is needed. Having less redundant (semi-)global state seems like a good improvement to me. :D

To keep the ConstProp errors the same, I had to add the option to `error_to_const_error` to overwrite the span. Also for some reason this changes cycle errors a bit -- not sure if we are now better or worse as giving those queries the right span. (It is unfortunately quite easy to accidentally use `DUMMY_SP` by calling the query on a `TyCtxt` instead of a `TyCtxtAt`.)

r? @oli-obk @eddyb
Stabilize Option::zip

This PR stabilizes the following API:

```rust
impl<T> Option<T> {
    pub fn zip<U>(self, other: Option<U>) -> Option<(T, U)>;
}
```

This API has real world usage as seen in <https://grep.app/search?q=-%3E%20Option%3C%5C%28T%2C%5Cs%3FU%5C%29%3E&regexp=true&filter[lang][0]=Rust>.

The `zip_with` method is left unstably as this API is kinda niche
and it hasn't received much usage in Rust repositories on GitHub.

cc rust-lang#70086
Rename "cyclone" to "apple-a7" per changes in upstream LLVM

It looks like they intended to keep "cyclone" as a legacy option, but removed it from the list of subtarget features. This created a flood of warnings when targeting aarch64-apple-ios, and probably also created incorrectly optimized artifacts.

See:
https://reviews.llvm.org/D70779
https://reviews.llvm.org/D70779#C1703593NL568

LLVM 10 merged into master at:
rust-lang#67759
…ample, r=dtolnay

Example about explicit mutex dropping

Fixes rust-lang#67457.

Following the remarks made in rust-lang#73074, I added an example on the main `Mutex` type, with a situation where there is mutable data and a computation result.

In my testing it is effectively needed to explicitly drop the lock, else it deadlocks.

r? @dtolnay because you were the one to review the previous PR.
…nul, r=dtolnay

Add methods to go from a nul-terminated Vec<u8> to a CString

Fixes rust-lang#73100.

Doc tests have been written and the documentation on the error type
updated too.

I used `#[stable(feature = "cstring_from_vec_with_nul", since = "1.46.0")]` but I don't know if the version is correct.
…acrum

Remove vestigial CI job msvc-aux.

This CI job isn't really doing anything, so it seems prudent to remove it.

For some history:
* This was introduced in rust-lang#48809 when the msvc job was split in two to keep it under 2 hours (oh the good old days). At the time, this check-aux job did a bunch of things:
    * tidy
    * src/test/pretty
    * src/test/run-pass/pretty
    * src/test/run-fail/pretty
    * src/test/run-pass-valgrind/pretty
    * src/test/run-pass-fulldeps/pretty
    * src/test/run-fail-fulldeps/pretty
* Tidy was removed in rust-lang#60777.
* run-pass and run-pass-fulldeps moved to UI in rust-lang#63029
* src/test/pretty removed in rust-lang#58140
* src/test/run-fail moved to UI in rust-lang#71185
* run-fail-fulldeps removed in rust-lang#51285

Over time through attrition, the job was left with one lonely thing: `src/test/run-pass-valgrind/pretty`. And of course, this wasn't actually running the "pretty" tests. The normal `run-pass-valgrind` tests ran, and then when it tried to run in "pretty" mode, all the tests were ignored because compiletest thought nothing had changed (apparently compiletest isn't fingerprinting the mode?  Needs more investigation…). `run-pass-valgrind` is already being run as part of `x86_64-msvc-1`, so there's no need to run it here.

I've taken the liberty of removing `src/test/run-pass-valgrind/pretty` as a distinct test. I'm guessing from the other PR's that the pretty tests should now live in `src/test/pretty`, and that the team has moved away from doing pretty tests on other parts of the `src/test` tree.
Revert heterogeneous SocketAddr PartialEq impls

Originally added in rust-lang#72239.

These lead to inference regressions (mostly in tests) in code that looks like:

```rust
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
```

That compiles as of stable 1.44.0 but fails in beta with:

```console
error[E0284]: type annotations needed
 --> src/main.rs:3:41
  |
3 |     assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
  |                                         ^^^^^ cannot infer type for type parameter `F` declared on the associated function `parse`
  |
  = note: cannot satisfy `<_ as std::str::FromStr>::Err == _`
help: consider specifying the type argument in the method call
  |
3 |     assert_eq!(socket, "127.0.0.1:8080".parse::<F>().unwrap());
  |
```

Closes rust-lang#73242.
extend network support for HermitCore

- add basic support of TcpListerner for HermitCore
- revise TcpStream to support peer_addr
@RalfJung
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=10

@rustbot rustbot added the rollup A PR which is a rollup label Jun 15, 2020
@bors
Copy link
Contributor

bors commented Jun 15, 2020

📌 Commit 54bd077 has been approved by RalfJung

@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 Jun 15, 2020
@bors
Copy link
Contributor

bors commented Jun 15, 2020

⌛ Testing commit 54bd077 with merge ff4a253...

@bors
Copy link
Contributor

bors commented Jun 15, 2020

☀️ Test successful - checks-azure
Approved by: RalfJung
Pushing ff4a253 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.