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 5 pull requests #71014

Merged
merged 15 commits into from
Apr 11, 2020
Merged

Rollup of 5 pull requests #71014

merged 15 commits into from
Apr 11, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Apr 10, 2020

Successful merges:

Failed merges:

r? @ghost

eddyb and others added 15 commits April 7, 2020 14:59
The `_` binding form is special, in that it encodes a "no-op": nothing is
actually bound, and thus nothing is moved or borrowed in this scenario. Usually
we do the "right" thing in all such cases. The exceptions are explicitly pointed
out in this test case, so that we keep track of whether they are eventually
fixed.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
…entril

tests encoding current behavior for various cases of "binding" to _.

The `_` binding form is special, in that it encodes a "no-op": nothing is actually bound, and thus nothing is moved or borrowed in this scenario. Usually we do the "right" thing in all such cases. The exceptions are explicitly pointed out in this test case, so that we keep track of whether they are eventually fixed.

Cc rust-lang#53114.

(This does not close the aforementioned issue; it just adds the tests encoding the current behavior, which we hope to eventually fix.)
…d-attrs, r=Mark-Simulacrum

bootstrap: work around "unused attribute" errors in incremental stdlib rebuilds.

This should alleviate rust-lang#58633 separately from a proper fix.

r? @Mark-Simulacrum
…, r=matthewjasper

Normalize MIR locals' types for generator layout computation.

fixes rust-lang#70905
…fJung

added machine hooks to track deallocations

This is part of rust-lang/miri#1314 in order to allow miri to show stack traces for on deallocation in order to debug use-after-free bugs
Normalize function signature in function casting check procedure

Fixes rust-lang#54094
```rust
trait Zoo {
    type X;
}

impl Zoo for u16 {
    type X = usize;
}

fn foo(abc: <u16 as Zoo>::X) {}

fn main() {
    let x: *const u8 = foo as _;
}
```

Currently a `FnDef` need to be checked if it's able to cast to `FnPtr` before it is actually casted. But the signature of `FnPtr` target's associated types are not normalized:

https://github.com/rust-lang/rust/blob/96d77f0e5f103612d62b85938aacfb33f5768433/src/librustc_typeck/check/cast.rs#L536-L553
However, during the coercion check, the signature of `FnPtr` target's associated types are normalized (The `<u16 as Zoo>::X` turns into `usize`).

https://github.com/rust-lang/rust/blob/96d77f0e5f103612d62b85938aacfb33f5768433/src/librustc_typeck/check/coercion.rs#L687-L729

This inconsistency leads to the error:`Err(Sorts(ExpectedFound { expected: <u16 as Zoo>::X, found: usize }))`.
@Centril Centril added the rollup A PR which is a rollup label Apr 10, 2020
@Centril
Copy link
Contributor Author

Centril commented Apr 10, 2020

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Apr 10, 2020

📌 Commit 0a6d177 has been approved by Centril

@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 Apr 10, 2020
@bors
Copy link
Contributor

bors commented Apr 11, 2020

⌛ Testing commit 0a6d177 with merge c6af13df53b46e6f7b71826be2d56a18750e66e0...

@bors
Copy link
Contributor

bors commented Apr 11, 2020

💔 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 Apr 11, 2020
@Dylan-DPC-zz
Copy link

@bors retry

1 similar comment
@Dylan-DPC-zz
Copy link

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2020
@bors
Copy link
Contributor

bors commented Apr 11, 2020

⌛ Testing commit 0a6d177 with merge 7688266...

@bors
Copy link
Contributor

bors commented Apr 11, 2020

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 7688266 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 11, 2020
@bors bors merged commit 7688266 into rust-lang:master Apr 11, 2020
@Centril Centril deleted the rollup-3lc8cnt branch April 11, 2020 18:23
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.

8 participants