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

Closed
wants to merge 46 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

pietroalbini and others added 30 commits November 12, 2019 11:03
This commit replaces the mirrors base URL contained in the MINGW_URL
with a CUSTOM_MINGW=1 environment variable. The mirrors base URL will be
fetched instead through the MIRRORS_BASE environment variable, defined
in src/ci/shared.sh.
The task was already run just there, so this cleans things up.
CentOS 5 only supports SSLv3 without SNI, and to get newer protocols
working we need to download and compile OpenSSL and cURL from our
mirror. Because of that, we can't use the CDN, as CloudFront requires
TLSv1 with SNI.

This commit changes the dist-x86_64-linux image to bypass the CDN for
OpenSSL and cURL.
When using an async closure as a value in a place that expects a future,
suggest calling the closure.

Fix rust-lang#65923.
remove Copy from Iterator as per comment
rust-lang#58520 (comment)
The wasm targets don't support gdb anyway so there's no need for this
section there.
Related: rust-lang#66426

This commit adds handling for opaque types during inference variable
fallback. Type variables generated from the instantiatino of opaque
types now fallback to the opque type itself.

Normally, the type variable for an instantiated opaque type is either
unified with the concrete type, or with the opaque type itself (e.g when
a function returns an opaque type by calling another function).

However, it's possible for the type variable to be left completely
unconstrained. This can occur in code like this:

```rust
pub type Foo = impl Copy;
fn produce() -> Option<Foo> {
    None
}
```

Here, we'll instantatiate the `Foo` in `Option<Foo>` to a fresh type
variable, but we will never unify it with anything due to the fact
that we return a `None`.

This results in the error message:

`type annotations needed: cannot resolve `_: std::marker::Copy``

pointing at `pub type Foo = impl Copy`.

This message is not only confusing, it's incorrect. When an opaque type
inference variable is completely unconstrained, we can always fall back
to using the opaque type itself. This effectively turns that particular
use of the opaque type into a non-defining use, even if it appears in a
defining scope.
This allows argv[0] to be overridden on the executable's command-line. This also makes the program
executed independent of argv[0].

Does Fuchsia have the same semantics?

Addresses: rust-lang#66510
estebank and others added 16 commits November 18, 2019 11:46
Because it's the only file that uses it, and removes the need for
importing it.
…xcrichton

Misc CI improvements

This PR contains some misc improvements to our CI configuration:

* The environment variables for MinGW builders were greatly simplified, with just `CUSTOM_MINGW=1` to tell the install scripts to install the vendored copy. All the others (`MINGW_URL`, `MINGW_DIR`, `MINGW_ARCHIVE` and `MSYS_BITS`) are detected either from the builder name or the environment.
* Collecting CPU stats and running the build were moved into scripts.
* Toolstate scripts validation was previously a separate step, ran just when `IMAGE=mingw-check`. This moves the validation code inside the actual image.
* Vendored copies are now fetched from https://ci-mirrors.rust-lang.org instead of directly from the bucket.

r? @alexcrichton
…, r=Centril

Suggest calling async closure when needed

When using an async closure as a value in a place that expects a future,
suggest calling the closure.

Fix rust-lang#65923.
…andler, r=GuillaumeGomez

[doc] Fix the source code highlighting on source comments

The code would always forget the previous selection.

r? @GuillaumeGomez
…varkor

Fix 'type annotations needed' error with opaque types

Related: rust-lang#66426

This commit adds handling for opaque types during inference variable
fallback. Type variables generated from the instantiation of opaque
types now fallback to the opaque type itself.

Normally, the type variable for an instantiated opaque type is either
unified with the concrete type, or with the opaque type itself (e.g when
a function returns an opaque type by calling another function).

However, it's possible for the type variable to be left completely
unconstrained. This can occur in code like this:

```rust
pub type Foo = impl Copy;
fn produce() -> Option<Foo> {
    None
}
```

Here, we'll instantatiate the `Foo` in `Option<Foo>` to a fresh type
variable, but we will never unify it with anything due to the fact
that we return a `None`.

This results in the error message:
```
type annotations needed: cannot resolve `_: std::marker::Copy
```

pointing at `pub type Foo = impl Copy`.

This message is not only confusing, it's incorrect. When an opaque type
inference variable is completely unconstrained, we can always fall back
to using the opaque type itself. This effectively turns that particular
use of the opaque type into a non-defining use, even if it appears in a
defining scope.
rustc_plugin: Remove the compatibility shim

The compatibility crate was introduced in rust-lang#62727 to migrate Cargo and some other tools, but now it's no longer necessary.
…astorino

Add JohnTitor to rustc-guide toolstate notification list

Add JohnTitor to rustc-guide toolstate notification list
Also, update org names of some books

r? @spastorino
std::error::Chain: remove Copy

remove Copy from Iterator as per comment
rust-lang#58520 (comment)

Tracker: rust-lang#58520
Add unix::process::CommandExt::arg0

This allows argv[0] to be overridden on the executable's command-line. This also makes the program
executed independent of argv[0].

Does Fuchsia have the same semantics? I'm assuming so.

Addresses: rust-lang#66510
Disable gdb pretty printer global section on wasm targets

The wasm targets don't support gdb anyway so there's no need for this
section there.
resolve: Give derive helpers highest priority during resolution

So they just shadow everything else and don't create ambiguity errors.
This matches the old pre-rust-lang#64694 behavior most closely.

---
The change doesn't apply to this "compatibility" case
```rust
#[trait_helper] // The helper attribute is used before it introduced.
                        // Sadly, compiles on stable, supported via hacks.
                        // I plan to make a compatibility warning for this.
#[derive(Trait)]
struct S;
```
, such attributes still create ambiguities, but rust-lang#64694 didn't change anything for this case.

Fixes rust-lang#66508
Fixes rust-lang#66525
Move the definition of `QueryResult` into `plumbing.rs`.

Because it's the only file that uses it, and removes the need for importing it.

r? @Centril
@JohnTitor JohnTitor added the rollup A PR which is a rollup label Nov 19, 2019
@JohnTitor
Copy link
Member Author

@bors r+ p=13 rollup=never

@bors
Copy link
Contributor

bors commented Nov 19, 2019

📌 Commit 98d6429 has been approved by JohnTitor

@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 19, 2019
@bors
Copy link
Contributor

bors commented Nov 19, 2019

⌛ Testing commit 98d6429 with merge f82d7ef...

bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 13 pull requests

Successful merges:

 - #66090 (Misc CI improvements)
 - #66239 (Suggest calling async closure when needed)
 - #66430 ([doc] Fix the source code highlighting on source comments)
 - #66431 (Fix 'type annotations needed' error with opaque types)
 - #66461 (Add explanation message for E0641)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66478 (rustc_plugin: Remove the compatibility shim)
 - #66493 (Add JohnTitor to rustc-guide toolstate notification list)
 - #66511 (std::error::Chain: remove Copy)
 - #66512 (Add unix::process::CommandExt::arg0)
 - #66520 (Disable gdb pretty printer global section on wasm targets)
 - #66529 (resolve: Give derive helpers highest priority during resolution)
 - #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)

Failed merges:

r? @ghost
@rust-highfive
Copy link
Collaborator

The job dist-various-2 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-19T11:59:56.1233349Z [RUSTC-TIMING] hashbrown test:false 0.791
2019-11-19T11:59:56.8055171Z error[E0412]: cannot find type `CStr` in this scope
2019-11-19T11:59:56.8056293Z    --> src/libstd/sys/unix/process/process_common.rs:189:35
2019-11-19T11:59:56.8056868Z     |
2019-11-19T11:59:56.8057321Z 189 |     pub fn get_program(&self) -> &CStr {
2019-11-19T11:59:56.8058230Z     |
2019-11-19T11:59:56.8058668Z help: possible candidate is found in another module, you can import it into scope
2019-11-19T11:59:56.8059053Z     |
2019-11-19T11:59:56.8059474Z 1   | use crate::ffi::c_str::CStr;
---
2019-11-19T12:00:00.3085767Z   local time: Tue Nov 19 12:00:00 UTC 2019
2019-11-19T12:00:00.8440598Z   network time: Tue, 19 Nov 2019 12:00:00 GMT
2019-11-19T12:00:00.8443562Z == end clock drift check ==
2019-11-19T12:00:05.0189548Z 
2019-11-19T12:00:05.0275466Z ##[error]Bash exited with code '1'.
2019-11-19T12:00:05.0320775Z ##[section]Starting: Checkout
2019-11-19T12:00:05.0322790Z ==============================================================================
2019-11-19T12:00:05.0322906Z Task         : Get sources
2019-11-19T12:00:05.0323010Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Nov 19, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 19, 2019
@Centril Centril closed this Nov 19, 2019
@JohnTitor JohnTitor deleted the rollup-89ve6xc branch November 19, 2019 14:29
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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.