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 8 pull requests #71721

Merged
merged 26 commits into from
May 1, 2020
Merged

Rollup of 8 pull requests #71721

merged 26 commits into from
May 1, 2020

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Apr 30, 2020

Successful merges:

Failed merges:

r? @ghost

bluss and others added 26 commits April 14, 2020 21:51
By creating a *mut [T] directly (without going through &mut [T]), avoid
questions of validity of the contents of the slice.

Consider the following risky code:

```rust
unsafe {
    let mut v = Vec::<bool>::with_capacity(16);
    v.set_len(16);
}
```

The intention is that with this change, the above snippet will be
sound because Vec::drop does no longer produces a mutable slice of
the vector's contents.
This was introduced in the recent bump to 1.43 bootstrap cargo
Update Vec drop with a comment to explain why we want to use a raw
slice, and extend this pattern to also include the Vec's IntoIter.
Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)
Vec drop and truncate: drop using raw slice *mut [T]

By creating a *mut [T] directly (without going through &mut [T]), avoid
questions of validity of the contents of the slice.

Consider the following risky code:

```rust
unsafe {
    let mut v = Vec::<bool>::with_capacity(16);
    v.set_len(16);
}
```

The intention is that with this change, we avoid one of the soundness
questions about the above snippet, because Vec::drop no longer
produces a mutable slice of the vector's contents.

r? @RalfJung
…matthewjasper

Add a convenience method on `TyCtxt` for checking for thread locals

This PR extracts the cleanup part of rust-lang#71192

r? @bjorn3
…iaskrgr

Handle build completion message from Cargo

This was introduced in the recent bump to 1.44 bootstrap cargo

Fixes rust-lang#71561.
MIR dump: print pointers consistently with Miri output

This makes MIR allocation dump pointer printing consistent with Miri output: both use hexadecimal offsets with a `0x` prefix. To save some space, MIR dump replaces the `alloc` prefix by `a` when necessary.

I also made AllocId/Pointer printing more consistent in their Debug/Display handling, and adjusted Display printing for Scalar a bit to avoid using decimal printing when we do not know the sign with which to interpret the value (IMO using decimal then is misleading).
Bump pulldown-cmark

Pulls in 0.7.1 with the following fixes:

- Update html5ever to 0.25
- Fix hang on unclosed html element

Closes rust-lang#70871
…i-obk

Allow `Downcast` projections unconditionally in const-checking

`ProjectionElem::Downcast` sounds scary, but it's really just the projection we use to access a particular enum variant. They usually appear in the lowering of a `match` statement, so they have been associated with control flow in const-checking, but they don't do any control flow by themselves. We already have a HIR pass that looks for `if` and `match` (even ones that have 1 or fewer reachable branches). That pass is double-checked by a MIR pass that looks for `SwitchInt`s and `FakeRead`s for match scrutinees. In my opinion, there's no need to look for `Downcast` as well.

r? @oli-obk
…=oli-obk,RalfJung

Allow `Unreachable` terminators unconditionally in const-checking

If we ever actually reach an `Unreachable` terminator while executing, the MIR is ill-formed or the user's program is UB due to something like `unreachable_unchecked`. I don't think we need to forbid these in `qualify_min_const_fn`.

r? @oli-obk
…k-Simulacrum

Update backtrace-sys

Diff:

- Don't look for old RUSTC_DEBUGINFO vars (rust-lang/backtrace-rs#313)

This fixes an issue of libbacktrace never being built with debuginfo.

r? @Mark-Simulacrum
cc @alexcrichton
@tmandry
Copy link
Member Author

tmandry commented Apr 30, 2020

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Apr 30, 2020

📌 Commit 59abc2a has been approved by tmandry

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

bors commented Apr 30, 2020

⌛ Testing commit 59abc2a with merge 614f273...

@bors
Copy link
Contributor

bors commented May 1, 2020

☀️ Test successful - checks-azure
Approved by: tmandry
Pushing 614f273 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 1, 2020
@bors bors merged commit 614f273 into rust-lang:master May 1, 2020
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #71721!

Tested on commit 614f273.
Direct link to PR: #71721

💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request May 1, 2020
Tested on commit rust-lang/rust@614f273.
Direct link to PR: <rust-lang/rust#71721>

💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
@tmandry tmandry deleted the rollup-e27pxex branch May 1, 2020 21:22
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. 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.

9 participants