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

Closed
wants to merge 19 commits into from

Commits on Dec 30, 2022

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

Commits on Jan 4, 2023

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

Commits on Jan 12, 2023

  1. Fix mir-opt tests for big-endian platforms

    The test cases src/test/mir-opt/building/custom/consts.rs and
    src/test/mir-opt/const_prop/mutable_variable_no_prop.rs are
    currently failing on big-endian platforms as the binary encoding
    of some constants is hard-coded in the MIR test files.  Fix this
    by choosing constant values that have the same encoding on big-
    and little-endian platforms.
    
    The test case src/test/mir-opt/issues/issue_75439.rs is failing
    as well, but since the purpose of the test is to validate handling
    of big-endian integer encodings on a little-endian platform, it does
    not make much sense to run it on big-endian platforms in the first
    place - we can just ignore it there.
    
    Fixed part of rust-lang#105383.
    uweigand committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    6885733 View commit details
    Browse the repository at this point in the history
  2. Avoid __cxa_thread_atexit_impl on Emscripten

     - Fixes rust-lang#91628.
     - Fixes emscripten-core/emscripten#15722.
    
    See discussion in both issues.
    
    The TL;DR is that weak linkage causes LLVM to produce broken Wasm, presumably due to pointer mismatch. The code is casting a void pointer to a function pointer with specific signature, but Wasm is very strict about function pointer compatibility, so the resulting code is invalid.
    
    Ideally LLVM should catch this earlier in the process rather than emit invalid Wasm, but it currently doesn't and this is an easy and valid fix, given that Emcripten doesn't have `__cxa_thread_atexit_impl` these days anyway.
    
    Unfortunately, I can't add a regression test as even after looking into this issue for a long time, I couldn't reproduce it with any minimal Rust example, only with extracted LLVM IR or on a large project involving Rust + C++.
    
    r? @alexcrichton
    RReverser authored Jan 12, 2023
    Configuration menu
    Copy the full SHA
    6155b9a View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2023

  1. Emit a hint for bad call return types due to generic arguments

    When the return type of a function call depends on the type of an
    argument, e.g.
    
    ```
    fn foo<T>(x: T) -> T {
        x
    }
    ```
    
    and the expected type is set due to either an explicitly typed
    binding, or because the call to the function is in a tail position
    without semicolon, the current error implies that the argument in the
    call has the wrong type.
    
    This new hint highlights that the expected type doesn't match the
    returned type, which matches the argument type, and that that's why
    we're flagging the argument type.
    
    Fixes rust-lang#43608.
    sulami committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    a3cf382 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6e6d2a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d6b09e View commit details
    Browse the repository at this point in the history
  4. Add tests

    estebank committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    81ba427 View commit details
    Browse the repository at this point in the history
  5. Do not incorrectly suggest restricting implied bounds

    When we have already suggested bounds that imply the about to be
    suggested bound, skip them.
    estebank committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    22a0e4f View commit details
    Browse the repository at this point in the history
  6. Update the wasi-libc used for the wasm32-wasi target

    This commit updates the wasi-libc revision used to build with the
    wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377
    which is needed to fix a use case I've been working on recently. This
    should be a relatively small update hopefully and is not expected to
    have any user impact.
    alexcrichton committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    b047aec View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2023

  1. Configuration menu
    Copy the full SHA
    a1614d0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#106046 - uweigand:s390x-test-bigendian-mir,…

    … r=Mark-Simulacrum
    
    Fix mir-opt tests for big-endian platforms
    
    The test cases src/test/mir-opt/building/custom/consts.rs and src/test/mir-opt/const_prop/mutable_variable_no_prop.rs are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the MIR test files.  Fix this by choosing constant values that have the same encoding on big- and little-endian platforms.
    
    The test case src/test/mir-opt/issues/issue_75439.rs is failing as well, but since the purpose of the test is to validate handling of big-endian integer encodings on a little-endian platform, it does not make much sense to run it on big-endian platforms in the first place - we can just ignore it there.
    
    Fixed part of rust-lang#105383.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    b82df7c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#106072 - eopb:dyn-derive, r=estebank

    fix: misleading "add dyn keyword before derive macro" suggestion
    
    Fixes rust-lang#106071
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    037b512 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum

    tidy: Don't include wasm32 in compiler dependency check
    
    This changes the tidy compiler dependency check so that it does not include wasm32-unknown-unknown dependencies in the PERMITTED_RUSTC_DEPENDENCIES. This just helps keep the list cleaner under the assumption that the compiler will never work on wasm32-unknown-unknown.
    
    This also fixes a bug in the check to verify there are no unused dependencies in the PERMITTED_RUSTC_DEPENDENCIES. Previously the check was verifying that the dependency was used *anywhere* in the workspace, when it should have been checking if it was used for the compiler.
    
    There's also just a little general cleanup here. For example, the old `normal_deps_of_r` function was changed a while ago to return *all* dependencies, but the function name and description wasn't updated to remove `normal_`.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    2929796 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#106644 - alexcrichton:update-wasi-toolchain…

    …, r=cuviper
    
    Update the wasi-libc used for the wasm32-wasi target
    
    This commit updates the wasi-libc revision used to build with the wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377 which is needed to fix a use case I've been working on recently. This should be a relatively small update hopefully and is not expected to have any user impact.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    3fbfd5f View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#106752 - sulami:master, r=estebank

    Emit a hint for bad call return types due to generic arguments
    
    When the return type of a function call depends on the type of an argument, e.g.
    
    ```
    fn foo<T>(x: T) -> T {
        x
    }
    ```
    
    and the expected type is set due to either an explicitly typed binding, or because the call to the function is in a tail position without semicolon, the current error implies that the argument in the call has the wrong type.
    
    This new hint highlights that the expected type doesn't match the returned type, which matches the argument type, and that that's why we're flagging the argument type.
    
    Fixes rust-lang#43608.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    d57dcfd View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#106779 - RReverser:patch-2, r=Mark-Simulacrum

    Avoid __cxa_thread_atexit_impl on Emscripten
    
     - Fixes rust-lang#91628.
     - Fixes emscripten-core/emscripten#15722.
    
    See discussion in both issues.
    
    The TL;DR is that weak linkage causes LLVM to produce broken Wasm, presumably due to pointer mismatch. The code is casting a void pointer to a function pointer with specific signature, but Wasm is very strict about function pointer compatibility, so the resulting code is invalid.
    
    Ideally LLVM should catch this earlier in the process rather than emit invalid Wasm, but it currently doesn't and this is an easy and valid fix, given that Emcripten doesn't have `__cxa_thread_atexit_impl` these days anyway.
    
    Unfortunately, I can't add a regression test as even after looking into this issue for a long time, I couldn't reproduce it with any minimal Rust example, only with extracted LLVM IR or on a large project involving Rust + C++.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    38c92d0 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#106788 - estebank:elaborate_pred_E0599, r=c…

    …ompiler-errors
    
    Tweak E0599 and elaborate_predicates
    
    CC rust-lang#86377.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    4c0cd8f View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#106831 - estebank:tickets_yaml, r=Mark-Simu…

    …lacrum
    
    Use GitHub yaml templates for ICE, Docs and Diagnostics tickets
    
    The GitHub yaml templates allow us to define HTML forms with validation for issue templates, instead of the current markdown based templates which only let us introduce text into the user editable text area. The form lets us make some fields mandatory, as well as add text that won't pollute the user's text and titles that won't be interfered with by enterprising users.
    matthiaskrgr authored Jan 14, 2023
    Configuration menu
    Copy the full SHA
    28955aa View commit details
    Browse the repository at this point in the history