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

Rustup #2753

Merged
merged 16 commits into from
Jan 9, 2023
Merged

Rustup #2753

merged 16 commits into from
Jan 9, 2023

Commits on Jan 3, 2023

  1. Auto merge of #95644 - WaffleLapkin:str_split_as_str_refactor_take2, …

    …r=Amanieu
    
    `Split*::as_str` refactor
    
    I've made this patch almost a year ago, so the rename and the behavior change are in one commit, sorry 😅
    
    This fixes #84974, as it's required to make other changes work.
    
    This PR
    - Renames `as_str` method of string `Split*` iterators to `remainder` (it seems like the `as_str` name was confusing to users)
    - Makes `remainder` return `Option<&str>`, to distinguish between "the iterator is exhausted" and "the tail is empty", this was [required on the tracking issue](rust-lang/rust#77998 (comment))
    
    r? `@m-ou-se`
    bors committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    2b960b1 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #101792 - lqd:rust-lld, r=petrochenkov

    Only specify `--target` by default for `-Zgcc-ld=lld` on wasm
    
    On macOS, it's not yet clear which cases of clang/OS/target/SDK version impact how to find ld/lld/rust-lld. The `--target` argument is not needed on our current targets with a vanilla config to do so, but may be in some cases ?
    
    That is, things look to be different and more subtle than suggested in rust-lang/rust#97402 (comment).
    
    Specifying this argument unconditionally currently breaks `-Zgcc-ld=lld` on the 10.7+ targets on x64 macOS. Vanilla configs on x64 and aarch64 don't seem to need it to be able to find `rust-lld`.
    
    This fixes #101653 on macOS (I've tried on x64 and aarch64: vanilla installs with the most recent command line tools available for each of the OS versions I have access to, `run-make/issue-71519` passes).
    
    I didn't expect the previous PRs to fail because of the existing tests, but CI does not actually run those tests yet, which explains the regressions. I was hoping to fix those in this PR but it's more involved (building lld is required for the tests to run, llvm/lld is not built on the test builders but on the dist builders, the dist builders don't run tests). This PR is just to unblock current users on macOS who have reported issues, but a regression could happen in the future by mistake until then.
    
    r? `@petrochenkov`
    bors committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    430a032 View commit details
    Browse the repository at this point in the history
  3. Auto merge of #105752 - chenyukang:yukang/refactor-method-error, r=co…

    …mpiler-errors
    
    Refactoring report_method_error
    
    While working on #105732, I found it's hard to follow this long function,
    so I tried to make it shorter.
    
    It's not easy for code reviewing, since so many lines of code changes,
    but only the positions are changed.
    
    Generally, I extract two sub-methods from `report_method_error`:
    
    https://github.com/rust-lang/rust/blob/397b66e77b279de5006facf87979f9ecff5c7f87/compiler/rustc_hir_typeck/src/method/suggest.rs#L117
    to `note_candidates_on_method_error`
    
    And this long block:
    https://github.com/rust-lang/rust/blob/397b66e77b279de5006facf87979f9ecff5c7f87/compiler/rustc_hir_typeck/src/method/suggest.rs#L263
    
    to `report_no_match_method_error`.
    
    r? `@compiler-errors`
    bors committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    7d4d27d View commit details
    Browse the repository at this point in the history
  4. Auto merge of #105712 - amg98:feat/vita-support, r=wesleywiser

    PlayStation Vita support
    
    Just the compiler definitions for no-std projects and std support using newlib
    
    Earlier PR: rust-lang/rust#105606
    bors committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    565cd17 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

  1. Auto merge of #106239 - LegionMammal978:thin-box-drop-guard, r=Amanieu

    Deallocate ThinBox even if the value unwinds on drop
    
    This makes it match the behavior of an ordinary `Box`.
    bors committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    19c3be5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #106382 - tmiasko:sdniwnu-daed, r=wesleywiser

    Fix handling of dead unwinds in backward analyses
    
    Dead unwinds set contains a head of an unreachable unwind edge.
    bors committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    12b6da9 View commit details
    Browse the repository at this point in the history
  3. Auto merge of #106224 - bjorn3:staticlib_fixes, r=wesleywiser

    Small fixes for --crate-type staticlib
    
    The first commit doesn't have an effect until we start translating error messages. The second commit fixes potential linker errors when combining `--crate-type staticlib` with another crate type and I think `-Cprefer-dynamic`.
    bors committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    f6ec2ea View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2023

  1. Auto merge of #105409 - compiler-errors:closure-infer-cycle, r=jackh726

    Don't deduce a signature that makes a closure cyclic
    
    Sometimes when elaborating supertrait bounds for closure signature inference, we end up deducing a closure signature that is cyclical because either a parameter or the return type references a projection mentioning `Self` that also has escaping bound vars, which means that it's not eagerly replaced with an inference variable.
    
    Interestingly, this is not *just* related to my PR that elaborates supertrait bounds for closure signature deduction. The committed test `supertrait-hint-cycle-3.rs` shows **stable** code that is fixed by this PR:
    
    ```rust
    trait Foo<'a> {
        type Input;
    }
    
    impl<F: Fn(u32)> Foo<'_> for F {
        type Input = u32;
    }
    
    fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {}
    
    fn main() {
        needs_super(|_: u32| {});
    }
    ```
    
    Fixes #105401
    Fixes #105396
    
    r? types
    bors committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    17f96f0 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #106404 - tmiasko:dedup-box-derefs, r=wesleywiser

    Remove duplicated elaborate box derefs pass
    
    The pass runs earlier as a part of `run_runtime_lowering_passes`.
    
    The duplicate was added in #99102.
    bors committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    908969b View commit details
    Browse the repository at this point in the history
  3. Auto merge of #106487 - GuillaumeGomez:fix-kbd-var, r=notriddle

    Fix --kbd-color variable name in rustdoc.css
    
    Interestingly enough, it only impacted the dark theme.
    
    Before:
    
    ![Screenshot from 2023-01-05 11-03-17](https://user-images.githubusercontent.com/3050060/210754145-c3bb0f50-d35f-4543-bf73-010a4524a803.png)
    
    After:
    
    ![Screenshot from 2023-01-05 11-03-05](https://user-images.githubusercontent.com/3050060/210754190-85c2f146-a774-4463-9cd3-9495b7c91bd7.png)
    
    r? `@notriddle`
    bors committed Jan 5, 2023
    Configuration menu
    Copy the full SHA
    de2b33c View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2023

  1. Auto merge of #106283 - JulianKnodt:enum_err, r=cjgillot

    Add help diag. for `const = Enum` missing braces around `Enum`
    
    Previously it was not clear why this errored or if it was even supported, as there was no diagnostic that suggested wrapping it in braces.
    
    Thus, add a simple diagnostic that suggests wrapping enum variants in braces.
    
    Fixes #105927
    bors committed Jan 7, 2023
    Configuration menu
    Copy the full SHA
    d6e14ce View commit details
    Browse the repository at this point in the history
  2. Auto merge of #105323 - cjgillot:simplify-const-prop, r=davidtwco

    Perform SimplifyLocals before ConstProp.
    
    MIR before `ConstProp` may have a lot of dead writes, this makes `ConstProp` do unnecessary work.
    
    r? `@ghost`
    bors committed Jan 7, 2023
    Configuration menu
    Copy the full SHA
    2530d9d View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2023

  1. Auto merge of #106235 - compiler-errors:rework-bounds-collection, r=d…

    …avidtwco
    
    Rework `Bounds` collection
    
    I think it's weird for the `Bounds` struct in astconv to store its predicates *almost* converted into real predicates... so we do this eagerly, instead of lazily.
    bors committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    2083c85 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #106449 - GuillaumeGomez:rustdoc-gui-retry-mechanism, r…

    …=Mark-Simulacrum
    
    Add retry mechanism for rustdoc GUI tests to reduce flakyness
    
    Part of #93784.
    
    I added 3 retries for failing GUI tests. An important note: if more than half of total tests fail, I don't retry because it's very likely not flakyness anymore at this point but a missing update after changes.
    bors committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    d549485 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Configuration menu
    Copy the full SHA
    57135ed View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    RalfJung committed Jan 9, 2023
    Configuration menu
    Copy the full SHA
    3ebfbcd View commit details
    Browse the repository at this point in the history