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

Merged
merged 22 commits into from
Nov 17, 2021
Merged

Rollup of 8 pull requests #90984

merged 22 commits into from
Nov 17, 2021

Commits on Nov 8, 2021

  1. Configuration menu
    Copy the full SHA
    6d2f8af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    958de5a View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2021

  1. Add Vec::retain_mut

    GuillaumeGomez committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    c15b55a View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. Configuration menu
    Copy the full SHA
    130b9e9 View commit details
    Browse the repository at this point in the history
  2. Fix span for non-satisfied trivial trait bounds

    The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
    Now they only reference the obligation itself (`String: Copy`)
    
    Address rust-lang#90869
    Noratrieb committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    24acf86 View commit details
    Browse the repository at this point in the history
  3. Improve ManuallyDrop suggestion

    rukai committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    f980f81 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    50ec47a View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. feedback

    rukai committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    62acf7f View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

  1. Configuration menu
    Copy the full SHA
    de05d3e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    52199c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    17b5e2d View commit details
    Browse the repository at this point in the history
  4. Inline printable function

    5225225 committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    09e59c2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eee29b0 View commit details
    Browse the repository at this point in the history
  6. Update compiler/rustc_passes/src/check_attr.rs

    Co-authored-by: Yuki Okushi <jtitor@2k36.org>
    wesleywiser and JohnTitor committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    83ce771 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2021

  1. Rollup merge of rust-lang#89610 - guswynn:must_use_future, r=wesleywiser

    warn on must_use use on async fn's
    
    As referenced in rust-lang#78149
    
    This only works on `async` fn's for now, I can also look into if I can get `Box<dyn Future>` and `impl Future` working at this level (hir)
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    0734282 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#90667 - rukai:improve_static_lifetime_diagn…

    …ostics, r=estebank
    
    Improve diagnostics when a static lifetime is expected
    
    Makes progress towards rust-lang#90600
    
    The diagnostics here were previously entirely removed due to giving a misleading suggestion but if we instead provide an informative label in that same location it should better help the user understand the situation.
    
    I included the example from the issue as it demonstrates an area where the diagnostics are still lacking.
    Happy to remove that if its just adding noise atm.
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    d7b8688 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#90687 - jhpratt:const_panic, r=oli-obk

    Permit const panics in stable const contexts in stdlib
    
    Without this change, it is not possible to use `panic!` and similar (including `assert!`) in stable const contexts inside of stdlib. See rust-lang#89542 for a real-world case that currently fails for this reason. This does _not_ affect any user code.
    
    For example, this snippet currently fails to compile:
    
    ```rust
    #[stable(feature = "foo", since = "1.0.0")]
    #[rustc_const_stable(feature = "foo", since = "1.0.0")]
    const fn foo() {
        assert!(false);
        assert!(false, "foo");
    }
    ```
    
    With the addition of `#[rustc_const_unstable]` to `core::panicking::panic`, the error no longer occurs. This snippet has been added verbatim in this PR as a UI test.
    
    To avoid needing to add `#![feature(core_panic)]` to libcore, the two instances of direct calls to `core::panicking::panic` have been switched to use the `panic!` macro.
    
    I am requesting prioritization because this is holding up other stabilizations such as rust-lang#89542 (which is otherwise ready to merge and succeeds with this change)
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    ec84633 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#90772 - GuillaumeGomez:vec-retain-mut, r=jo…

    …shtriplett
    
    Add Vec::retain_mut
    
    This is to continue the discussion started in rust-lang#83218.
    
    Original comment was:
    
    > Take 2 of rust-lang#34265, since I needed this today.
    
    The reason I think why we should add `retain_mut` is for coherency and for discoverability. For example we have `chunks` and `chunks_mut` or `get` and `get_mut` or `iter` and `iter_mut`, etc. When looking for mutable `retain`, I would expect `retain_mut` to exist. It took me a while to find out about `drain_filter`. So even if it provides an API close to `drain_filter`, just for the discoverability, I think it's worth it.
    
    cc ``````@m-ou-se`````` ``````@jonas-schievink`````` ``````@Mark-Simulacrum``````
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    904dba5 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#90861 - 5225225:nonprinting-char, r=davidtwco

    Print escaped string if char literal has multiple characters, but only one printable character
    
    Fixes rust-lang#90857
    
    I'm not sure about the error message here, it could get rather long and *maybe* using the names of characters would be better? That wouldn't help the length any, though.
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    ab958a7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#90884 - Nilstrieb:fix-span-trivial-trait-bo…

    …und, r=estebank
    
    Fix span for non-satisfied trivial trait bounds
    
    The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
    Now they only reference the obligation itself (`String: Copy`)
    
    Address rust-lang#90869
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    23ad7a7 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#90900 - andjo403:removeLlvm12Check, r=nikic

    Remove workaround for the forward progress handling in LLVM
    
    this workaround was only needed for LLVM < 12 and the minimum LLVM version was updated to 12 in rust-lang#90175
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    fb660de View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#90901 - rukai:improve_manuallydrop_help, r=…

    …estebank
    
    Improve ManuallyDrop suggestion
    
    closes rust-lang#90585
    * Fixes the recommended change to use ManuallyDrop as per the issue
    * Changes the note to a help
    * improves the span so it only points at the type.
    matthiaskrgr committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    469faa2 View commit details
    Browse the repository at this point in the history