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

Merged
merged 15 commits into from
Oct 11, 2022
Merged

Rollup of 7 pull requests #102915

merged 15 commits into from
Oct 11, 2022

Commits on Sep 25, 2022

  1. Remove unused variable.

    cjgillot committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    75d3a9e View commit details
    Browse the repository at this point in the history
  2. Consistently write RwLock

    Before the documentation sometimes referred to an "rwlock" and sometimes to "`RwLock`".
    mgeisler committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    f67184f View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2022

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

Commits on Oct 3, 2022

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

Commits on Oct 4, 2022

  1. fix backtrace small typo

    Rageking8 committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    9fb509e View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2022

  1. Configuration menu
    Copy the full SHA
    a474ec5 View commit details
    Browse the repository at this point in the history
  2. rustdoc: remove unneeded <div> wrapper from sidebar DOM

    When this was added, the sidebar had a bit more complex style. It can be
    removed, now.
    notriddle committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    b63b02f View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Remove outdated comment

    notriddle committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    44f466c View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#102258 - cjgillot:core-kappa, r=m-ou-se

    Remove unused variable in float formatting.
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    ff903bb View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#102277 - mgeisler:rwlock, r=m-ou-se

    Consistently write `RwLock`
    
    Before the documentation sometimes referred to an "rwlock" and sometimes to "`RwLock`".
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    387df55 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#102412 - joboet:dont_panic, r=m-ou-se

    Never panic in `thread::park` and `thread::park_timeout`
    
    fixes rust-lang#102398
    
    `@rustbot` label +T-libs +T-libs-api
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    e0954ca View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#102589 - RalfJung:scoped-threads-dangling, …

    …r=m-ou-se
    
    scoped threads: pass closure through MaybeUninit to avoid invalid dangling references
    
    The `main` function defined here looks roughly like this, if it were written as a more explicit stand-alone function:
    ```rust
    // Not showing all the `'lifetime` tracking, the point is that
    // this closure might live shorter than `thread`.
    fn thread(control: ..., closure: impl FnOnce() + 'lifetime) {
        closure();
        control.signal_done();
        // A lot of time can pass here.
    }
    ```
    Note that `thread` continues to run even after `signal_done`! Now consider what happens if the `closure` captures a reference of lifetime `'lifetime`:
    - The type of `closure` is a struct (the implicit unnameable closure type) with a `&'lifetime mut T` field. References passed to a function are marked with `dereferenceable`, which is LLVM speak for *this reference will remain live for the entire duration of this function*.
    - The closure runs, `signal_done` runs. Then -- potentially -- this thread gets scheduled away and the main thread runs, seeing the signal and returning to the user. Now `'lifetime` ends and the memory the reference points to might be deallocated.
    - Now we have UB! The reference that as passed to `thread` with the promise of remaining live for the entire duration of the function, actually got deallocated while the function still runs. Oops.
    
    Long-term I think we should be able to use `ManuallyDrop` to fix this without `unsafe`, or maybe a new `MaybeDangling` type. I am working on an RFC for that. But in the mean time it'd be nice to fix this so that Miri with `-Zmiri-retag-fields` (which is needed for "full enforcement" of all the LLVM flags we generate) stops erroring on scoped threads.
    
    Fixes rust-lang#101983
    r? `@m-ou-se`
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    919d6bf View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#102625 - Rageking8:fix-backtrace-small-typo…

    …, r=m-ou-se
    
    fix backtrace small typo
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    b380518 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#102859 - cjgillot:collect-lifetimes, r=oli-obk

    Move lifetime resolution module to rustc_hir_analysis.
    
    Now that lifetime resolution has been removed from it, this file has nothing to do in `rustc_resolve`.  It's purpose is to compute Debruijn indices for lifetimes, so let's put it in type collection.
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    98764c0 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#102898 - notriddle:notriddle/sidebar-block,…

    … r=GuillaumeGomez
    
    rustdoc: remove unneeded `<div>` wrapper from sidebar DOM
    
    When this was added, the sidebar had a bit more complex style. It can be removed, now.
    
    Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-block/std/index.html
    JohnTitor committed Oct 11, 2022
    Configuration menu
    Copy the full SHA
    3011538 View commit details
    Browse the repository at this point in the history