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

Closed
wants to merge 20 commits into from

Commits on Apr 26, 2022

  1. Configuration menu
    Copy the full SHA
    5765819 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f10c0a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a03f15a View commit details
    Browse the repository at this point in the history

Commits on May 10, 2022

  1. Add test skip support

    libtest already supports a "--skip SUBSTRING" arg which excludes any
    test names matching SUBSTRING.
    
    This adds a "--skip" argument to compiletest and bootstrap which is
    forwarded to libtest.
    chbaker0 committed May 10, 2022
    Configuration menu
    Copy the full SHA
    b2316c1 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Clarify what values BorrowedHandle, OwnedHandle etc. can hold.

    Clarify that when `BorrowedHandle`, `OwnedHandle`, or `HandleOrNull`
    hold the value `-1`, it always means the current process handle, and not
    `INVALID_HANDLE_VALUE`.
    sunfishcode committed May 11, 2022
    Configuration menu
    Copy the full SHA
    4ce68c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2bb7fdb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0a39e5a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f75b4a View commit details
    Browse the repository at this point in the history
  5. Add test of matches macro for trailing commas

    ludfo774 authored May 11, 2022
    Configuration menu
    Copy the full SHA
    cdbfd3e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c586bc3 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2022

  1. Configuration menu
    Copy the full SHA
    516a7fa View commit details
    Browse the repository at this point in the history
  2. Fix comment syntax.

    sunfishcode committed May 12, 2022
    Configuration menu
    Copy the full SHA
    275812a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a315bb4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d3fd6bf View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#96455 - dtolnay:writetmp, r=m-ou-se

    Make write/print macros eagerly drop temporaries
    
    This PR fixes the 2 regressions in rust-lang#96434 (`println` and `eprintln`) and changes all the other similar macros (`write`, `writeln`, `print`, `eprint`) to match the old pre-rust-lang#94868 behavior of `println` and `eprintln`.
    
    argument position | before rust-lang#94868 | after rust-lang#94868 | after this PR
    --- |:---:|:---:|:---:
    `write!($tmp, "…", …)` | :rage: | :rage: | :smiley_cat:
    `write!(…, "…", $tmp)` | :rage: | :rage: | :smiley_cat:
    `writeln!($tmp, "…", …)` | :rage: | :rage: | :smiley_cat:
    `writeln!(…, "…", $tmp)` | :rage: | :rage: | :smiley_cat:
    `print!("…", $tmp)` | :rage: | :rage: | :smiley_cat:
    `println!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat:
    `eprint!("…", $tmp)` | :rage: | :rage: | :smiley_cat:
    `eprintln!("…", $tmp)` | :smiley_cat: | :rage: | :smiley_cat:
    `panic!("…", $tmp)` | :smiley_cat: | :smiley_cat: | :smiley_cat:
    
    Example of code that is affected by this change:
    
    ```rust
    use std::sync::Mutex;
    
    fn main() {
        let mutex = Mutex::new(0);
        print!("{}", mutex.lock().unwrap()) /* no semicolon */
    }
    ```
    
    You can see several real-world examples like this in the Crater links at the top of rust-lang#96434. This code failed to compile prior to this PR as follows, but works after this PR.
    
    ```console
    error[E0597]: `mutex` does not live long enough
     --> src/main.rs:5:18
      |
    5 |     print!("{}", mutex.lock().unwrap()) /* no semicolon */
      |                  ^^^^^^^^^^^^---------
      |                  |
      |                  borrowed value does not live long enough
      |                  a temporary with access to the borrow is created here ...
    6 | }
      | -
      | |
      | `mutex` dropped here while still borrowed
      | ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `MutexGuard`
    ```
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    eaf976c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#96493 - chbaker0:issue-96342-fix, r=Mark-Si…

    …mulacrum
    
    Add compiletest and bootstrap "--skip" option forwarded to libtest
    
    With this PR,  "x.py test --skip SKIP ..." will run the specified test suite, but forward "--skip SKIP" to the test tool. libtest already supports this option. The PR also adds it to compiletest which itself just forwards it to libtest.
    
    Adds the functionality requested in rust-lang#96342. This is useful to work around tests broken upstream.
    
    rust-lang#96362 (comment) is the specific test issue my project is trying to work around.
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    c7e56bb View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#96932 - sunfishcode:sunfishcode/document-bo…

    …rrowed-handle, r=joshtriplett
    
    Clarify what values `BorrowedHandle`, `OwnedHandle` etc. can hold.
    
    Reword the documentation to clarify that when `BorrowedHandle`, `OwnedHandle`, or `HandleOrNull` hold the value `-1`, it always means the current process handle, and not `INVALID_HANDLE_VALUE`.
    
    `-1` should only mean `INVALID_HANDLE_VALUE` after a call to a function documented to return that to report errors, which should lead I/O functions to produce errors rather than succeeding and producing `OwnedHandle` or `BorrowedHandle` values. So if a consumer of an `OwnedHandle` or `BorrowedHandle` ever sees them holding a `-1`, it should always mean the current process handle.
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    69581f8 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#96948 - ludfo774:macro-trailing-comma-test,…

    … r=joshtriplett
    
    Add test of matches macro for trailing commas
    
    Almost all macros are tested for trailing commas.
    The macro matches! was however not tested.
    This PR adds that test case.
    Related to rust-lang#46238
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    77b003d View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#96959 - nbdd0121:unwind, r=Amanieu

    Prevent unwinding when `-C panic=abort` is used regardless declared ABI
    
    Ensures that Rust code will abort with `-C panic=abort` regardless ABI used.
    ```rust
    extern "C-unwind" {
        fn may_unwind();
    }
    
    // Will be nounwind with `-C panic=abort`, despite `C-unwind` ABI.
    pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() {
        may_unwind();
    }
    ```
    
    Current behaviour is that unwind will propagate through. While the current behaviour won't cause unsoundness it is inconsistent with the text reading of [RFC2945](https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html).
    
    I tweaked `fn_can_unwind` instead of tweaking `AbortUnwindingCalls` because this approach would allow Rust (non-direct) callers to also see that this function is nounwind, so it can prevent excessive landing pads generation.
    
    For more discussions: https://rust-lang.zulipchat.com/#narrow/stream/210922-project-ffi-unwind/topic/soundness.20in.20mixed.20panic.20mode.
    
    cc `@alexcrichton,` `@BatmanAoD`
    r? `@Amanieu`
    
    `@rustbot` label: T-compiler T-lang F-c_unwind
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    8310eb8 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#96993 - notriddle:notriddle/prototype, r=Gu…

    …illaumeGomez
    
    rustdoc: fix GUI crash when searching for magic JS property values
    GuillaumeGomez authored May 12, 2022
    Configuration menu
    Copy the full SHA
    c5ea430 View commit details
    Browse the repository at this point in the history