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 6 pull requests #96218

Closed
wants to merge 27 commits into from
Closed

Commits on Apr 13, 2022

  1. Configuration menu
    Copy the full SHA
    53b2aca View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2022

  1. Update compiler/rustc_error_messages/src/lib.rs

    Co-authored-by: Janusz Marcinkiewicz <[email protected]>
    IsakNyberg and VirrageS authored Apr 16, 2022
    Configuration menu
    Copy the full SHA
    657ae03 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2022

  1. Configuration menu
    Copy the full SHA
    f7ce145 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    85ee04c View commit details
    Browse the repository at this point in the history
  3. add caution to some comments

    RalfJung committed Apr 17, 2022
    Configuration menu
    Copy the full SHA
    3ec1feb View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2022

  1. Configuration menu
    Copy the full SHA
    29cc8ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05489e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54ab357 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c9e568f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3236092 View commit details
    Browse the repository at this point in the history
  6. avoid an unnecessary call to Pointer::into_parts, and caution against…

    … into_pointer_or_addr
    RalfJung committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    c83241a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    55f0977 View commit details
    Browse the repository at this point in the history
  8. Define a dedicated error type for HandleOrNull and HandleOrInvalid.

    Define a `NotHandle` type, that implements `std::error::Error`, and use
    it as the error type in `HandleOrNull` and `HandleOrInvalid`.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    703a336 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5b3023c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    67994b7 View commit details
    Browse the repository at this point in the history
  11. Split NotHandle into NullHandleError and InvalidHandleError.

    Also, make the display messages more specific, and remove the `Copy`
    implementation.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    f934043 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    890125d View commit details
    Browse the repository at this point in the history
  13. Update the expected stderr for coerce-issue-49593-box-never.

    This test's expected stderr now includes a count of the number of types
    that implment `Error`. This PR introduces two new types, so increment
    the number by two.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    b7ff103 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. Configuration menu
    Copy the full SHA
    19ef182 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6abdd0b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    06a8f05 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#95813 - Urgau:rustdoc-where-clause-space, r…

    …=GuillaumeGomez
    
    Remove extra space before a where clause
    
    Remove extra space before where clause in the generated documentation.
    
    The fix is to move the space before the break-line so that it doesn't appear visually but is still here. Removing it completely would create things like this `impl<D> Delta<D>where D: MyTrait` (missing a space before the where) which I don't think we want.
    
    Added two regression test, first one test that the `<br>` is after the space and the second check that the `<br>` is before the spaces.
    
    Before:
    ![image](https://user-images.githubusercontent.com/3616612/162475212-d4bb6727-ed66-4a55-a4a2-4f55189bf8bd.png)
    
    After:
    ![image](https://user-images.githubusercontent.com/3616612/162475467-508fd082-60a7-4a8c-b693-8b188e8843e6.png)
    
    r? `@GuillaumeGomez`
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    9c93606 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#96029 - IsakNyberg:error-messages-fix, r=Dy…

    …lan-DPC
    
    Refactor loop into iterator; simplify negation logic.
    
    is_dummy should return when a non-dummy is found, but instead is iterated until completion. With some inspiration from line 323 this was refactored to a single line that returns once a single counterexample is found.
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    2c8c514 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#96162 - RalfJung:mark-uninit, r=oli-obk

    interpret: Fix writing uninit to an allocation
    
    When calling `mark_init`, we need to also be mindful of what happens with the relocations! Specifically, when we de-init memory, we need to clear relocations in that range as well or else strange things will happen (and printing will not show the de-init, since relocations take precedence there).
    
    Fixes rust-lang/miri#2068.
    
    Here's the Miri testcase that this fixes (requires `-Zmiri-disable-validation`):
    ```rust
    use std::mem::MaybeUninit;
    
    fn main() { unsafe {
        let mut x = MaybeUninit::<i64>::uninit();
        // Put in a ptr.
        x.as_mut_ptr().cast::<&i32>().write_unaligned(&0);
        // Overwrite parts of that pointer with 'uninit' through a Scalar.
        let ptr = x.as_mut_ptr().cast::<i32>();
        *ptr = MaybeUninit::uninit().assume_init();
        // Reading this back should hence work fine.
        let _c = *ptr;
    } }
    ```
    Previously this failed with
    ```
    error: unsupported operation: unable to turn pointer into raw bytes
      --> ../miri/uninit.rs:11:14
       |
    11 |     let _c = *ptr;
       |              ^^^^ unable to turn pointer into raw bytes
       |
       = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
    
       = note: inside `main` at ../miri/uninit.rs:11:14
    ```
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    357bd4a View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#96165 - RalfJung:miri-provenance-cleanup, r…

    …=oli-obk
    
    Miri provenance cleanup
    
    Reviewing rust-lang#95826 by `@carbotaniuman` made me realize that we could clean things up a little here.
    
    `@carbotaniuman` please let me know if you're okay with landing this (it will create a lot of conflicts with your PR), or if you'd prefer incorporating the ideas from this PR into yours. I think we want to end up in a situation where the function you called `ptr_reify_alloc` returns just two things, a concrete tag and an offset. Getting an `AllocId` from a concrete tag should be infallible like now. However a concrete tag and `Tag` don't have to be the same type.
    
    r? `@oli-obk`
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    4da2306 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#96195 - sunfishcode:sunfishcode/handle-or-e…

    …rror-type, r=joshtriplett
    
     Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`.
    
    Define `NullHandleError` and `InvalidHandleError` types, that implement std::error::Error, and use them as the error types in `HandleOrNull` and `HandleOrInvalid`,
    
    This addresses [this concern](rust-lang#87074 (comment)).
    
    This is the same as rust-lang#95387.
    
    r? ```@joshtriplett```
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    e0a4afd View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#96205 - m-ou-se:emscripten-futex-locks, r=t…

    …homcc
    
    Use futex locks on emscripten.
    
    This switches Emscripten to the futex-based lock implementations, away from pthread.
    
    Tracking issue: rust-lang#93740
    Dylan-DPC authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    7c5b0a7 View commit details
    Browse the repository at this point in the history