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 7 pull requests #125552

Merged
merged 20 commits into from
May 26, 2024
Merged

Rollup of 7 pull requests #125552

merged 20 commits into from
May 26, 2024

Commits on Feb 21, 2024

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

Commits on May 3, 2024

  1. Stabilize div_duration

    newpavlov committed May 3, 2024
    Configuration menu
    Copy the full SHA
    1f1653c View commit details
    Browse the repository at this point in the history
  2. Use CURRENT_RUSTC_VERSION

    newpavlov committed May 3, 2024
    Configuration menu
    Copy the full SHA
    6d223bb View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Fix VecDeque::shrink_to UB when handle_alloc_error unwinds.

    Luckily it's comparatively simple to just restore the `VecDeque` into a valid state on unwinds.
    Sp00ph committed May 7, 2024
    Configuration menu
    Copy the full SHA
    ffe8510 View commit details
    Browse the repository at this point in the history
  2. Move test_shrink_to_unwind to its own file.

    This way, no other test can be tripped up by `test_shrink_to_unwind` changing the alloc error hook.
    Sp00ph committed May 7, 2024
    Configuration menu
    Copy the full SHA
    5cb53bc View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

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

Commits on May 20, 2024

  1. Fix c_char on AIX

    taiki-e committed May 20, 2024
    Configuration menu
    Copy the full SHA
    c31ec4f View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. Add more tests

    oli-obk committed May 23, 2024
    Configuration menu
    Copy the full SHA
    dc8d1bc View commit details
    Browse the repository at this point in the history
  2. When checking whether an impl applies, constrain hidden types of opaq…

    …ue types.
    
    We already handle this case this way on the coherence side, and it matches the new solver's behaviour. While there is some breakage around type-alias-impl-trait (see new "type annotations needed" in tests/ui/type-alias-impl-trait/issue-84660-unsoundness.rs), no stable code breaks, and no new stable code is accepted.
    oli-obk committed May 23, 2024
    Configuration menu
    Copy the full SHA
    29a630e View commit details
    Browse the repository at this point in the history
  3. Allow defining opaque types during trait object upcasting.

    No stable code is affected, as this requires the `trait_upcasting` feature gate.
    oli-obk committed May 23, 2024
    Configuration menu
    Copy the full SHA
    7f292f4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4387eea View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. tidy: validate LLVM component names in tests

    LLVM component names are not immediately obvious (they usually omit any
    suffixes on the target arch name), and if they're incorrect, the test
    will silently never run.
    erikdesjardins committed May 24, 2024
    Configuration menu
    Copy the full SHA
    5888de8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1a18da View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

  1. Rollup merge of rust-lang#121377 - pitaj:lazy_cell_fn_pointer, r=dtolnay

    Stabilize `LazyCell` and `LazyLock`
    
    Closes rust-lang#109736
    
    This stabilizes the [`LazyLock`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html) and [`LazyCell`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html) types:
    
    ```rust
    static HASHMAP: LazyLock<HashMap<i32, String>> = LazyLock::new(|| {
        println!("initializing");
        let mut m = HashMap::new();
        m.insert(13, "Spica".to_string());
        m.insert(74, "Hoyten".to_string());
        m
    });
    
    let lazy: LazyCell<i32> = LazyCell::new(|| {
        println!("initializing");
        92
    });
    ```
    
    r? libs-api
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    890982e View commit details
    Browse the repository at this point in the history
  2. 1 Configuration menu
    Copy the full SHA
    2a1b632 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#123803 - Sp00ph:shrink_to_fix, r=Mark-Simul…

    …acrum
    
    Fix `VecDeque::shrink_to` UB when `handle_alloc_error` unwinds.
    
    Fixes rust-lang#123369
    
    For `VecDeque` it's relatively simple to restore the buffer into a consistent state so this PR does just that.
    
    Note that with its current implementation, `shrink_to` may change the internal arrangement of elements in the buffer, so e.g. `[D, <uninit>, A, B, C]` will become `[<uninit>, A, B, C, D]` and `[<uninit>, <uninit>, A, B, C]` may become `[B, C, <uninit>, <uninit>, A]` if `shrink_to` unwinds. This shouldn't be an issue though as we don't make any guarantees about the stability of the internal buffer arrangement (and this case is impossible to hit on stable anyways).
    
    This PR also includes a test with code adapted from rust-lang#123369 which fails without the new `shrink_to` code. Does this suffice or do we maybe need more exhaustive tests like in rust-lang#108475?
    
    cc `@Amanieu`
    
    `@rustbot` label +T-libs
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    7fb8122 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#124080 - oli-obk:define_opaque_types10, r=c…

    …ompiler-errors
    
    Some unstable changes to where opaque types get defined
    
    None of these can be reached from stable afaict.
    
    r? ``@compiler-errors``
    
    cc rust-lang#116652
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    1e84163 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#124667 - newpavlov:stabilize_div_duration, …

    …r=jhpratt
    
    Stabilize `div_duration`
    
    Closes rust-lang#63139
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    80aea30 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#125472 - erikdesjardins:component, r=clubby789

    tidy: validate LLVM component names in tests
    
    LLVM component names are not immediately obvious (they usually omit any suffixes on the target arch name), and if they're incorrect, the test will silently never run.
    
    This happened [here](rust-lang#125220 (comment)), and it would be nice to prevent it.
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    64730a1 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#125523 - saethlin:ctrlc-timeout, r=bjorn3

    Exit the process a short time after entering our ctrl-c handler
    
    Fixes rust-lang#124212
    
    r? `@bjorn3`
    matthiaskrgr authored May 25, 2024
    Configuration menu
    Copy the full SHA
    0ded36f View commit details
    Browse the repository at this point in the history