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

Merged
merged 23 commits into from
Dec 2, 2019
Merged

Rollup of 5 pull requests #66950

merged 23 commits into from
Dec 2, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 2, 2019

Successful merges:

Failed merges:

r? @ghost

ecstatic-morse and others added 23 commits November 27, 2019 13:07
Now, `derived_from_illegal_borrow` is also applied to reborrows, so we
don't show the user a useless error message.
This error code is never emitted, and the contents of this test are
identical to that of `E0017.rs`.
They now look the same in the MIR after rust-lang#66587.
This checks `static mut` as well for E0017, and blesses tests now that
we emit an error for a mut deref.
although, not sure why this works - it wasn't needed before
Configure sanitize option when compiling with a sanitizer to make
it possible to execute different code depending on whether given
sanitizer is enabled or not.
Conditional compilation for sanitizers

Configure sanitize option when compiling with a sanitizer to make
it possible to execute different code depending on whether given
sanitizer is enabled or not.
…eddyb,matthewjasper

Handle const-checks for `&mut` outside of `HasMutInterior`

Addresses [this comment](rust-lang#64470 (comment)).

Const-checking relied on `HasMutInterior` to forbid `&mut` in a const context. This was strange because all we needed to do was look for an `Rvalue::Ref` with a certain `BorrowKind`, whereas the `Qualif` traits are specifically meant to get the qualifs for a *value*. This PR removes that logic from `HasMutInterior` and moves it into `check_consts::Validator`.

As a result, we can now properly handle qualifications for `static`s, which had to be ignored previously since you can e.g. borrow a static `Cell` from another `static`. We also remove the `derived_from_illegal_borrow` logic, since it is no longer necessary; we give good errors for subsequent reborrows/borrows of illegal borrows.
libunwind_panic: adjust miri panic hack

We adjust the Miri hack in libpanic_unwind such that even with `cfg(miri)`, we build a version of libpanic_unwind that actually works.

This is needed to resolve rust-lang/rust-playground#548.

r? @oli-obk @alexcrichton
…oli-obk

handle diverging functions forwarding their return place

Fixes rust-lang/miri#1075: the shim around diverging closures turned into function pointers actually "obtains" a return place inside a diverging function, but just uses it as the return place for a diverging callee. Handle this by using NULL places.

This is kind of a hack as it breaks our invariant that all places are dereferencable, but we'd eventually let raw pointers break that anyway I assume so that seems fine.

r? @oli-obk
rustbuild fixes

When upgrading Debian's rustc to 1.38 I needed these patches:

(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.

(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:

~~~~
error: unnecessary `unsafe` block
   --> src/bootstrap/builder.rs:148:19
    |
148 |             name: unsafe { ::std::intrinsics::type_name::<S>() },
    |                   ^^^^^^ unnecessary `unsafe` block
    |
note: lint level defined here
   --> src/bootstrap/lib.rs:107:9
    |
107 | #![deny(warnings, rust_2018_idioms, unused_lifetimes)]
    |         ^^^^^^^^
    = note: `#[deny(unused_unsafe)]` implied by `#[deny(warnings)]`

error: aborting due to previous error

error: could not compile `bootstrap`.

~~~~

In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)
@RalfJung
Copy link
Member Author

RalfJung commented Dec 2, 2019

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 2, 2019

📌 Commit 910e83e 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 Dec 2, 2019
@bors
Copy link
Contributor

bors commented Dec 2, 2019

⌛ Testing commit 910e83e with merge 4af3ee8...

bors added a commit that referenced this pull request Dec 2, 2019
Rollup of 5 pull requests

Successful merges:

 - #66245 (Conditional compilation for sanitizers)
 - #66654 (Handle const-checks for `&mut` outside of `HasMutInterior`)
 - #66822 (libunwind_panic: adjust miri panic hack)
 - #66827 (handle diverging functions forwarding their return place)
 - #66834 (rustbuild fixes)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Dec 2, 2019

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 2, 2019
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.

6 participants