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

Merged
merged 17 commits into from Nov 27, 2022
Merged

Rustup #2702

merged 17 commits into from Nov 27, 2022

Commits on Nov 20, 2022

  1. Auto merge of #98914 - fee1-dead-contrib:min-deref-patterns, r=compil…

    …er-errors
    
    Minimal implementation of implicit deref patterns for Strings
    
    cc `@compiler-errors` `@BoxyUwU` rust-lang/lang-team#88 #87121
    
    ~~I forgot to add a feature gate, will do so in a minute~~ Done
    bors committed Nov 20, 2022
    Copy the full SHA
    6886ade View commit details
    Browse the repository at this point in the history
  2. Auto merge of #103390 - compiler-errors:metadata-mod-regions, r=eholk

    Check fat pointer metadata compatibility modulo regions
    
    Regions don't really mean anything anyways during hir typeck.
    
    If this `erase_regions` makes anyone nervous, it's probably equally valid to just equate the types using a type relation, but regardless we should _not_ be using strict type equality while region variables are present.
    
    Fixes #103384
    bors committed Nov 20, 2022
    Copy the full SHA
    1de3c7c View commit details
    Browse the repository at this point in the history
  3. Auto merge of #104617 - RalfJung:miri, r=RalfJung

    update Miri
    
    r? `@thomcc` for the lib changes (removing a `cfg(miri)` that is no longer needed)
    bors committed Nov 20, 2022
    Copy the full SHA
    95289c3 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2022

  1. Auto merge of #102717 - beetrees:repr128-c-style-debuginfo, r=nagisa

    Pass 128-bit C-style enum enumerator values to LLVM
    
    Pass the full 128 bits of C-style enum enumerators through to LLVM. This means that debuginfo for C-style repr128 enums is now emitted correctly for DWARF platforms (as compared to not being correctly emitted on any platform).
    
    Tracking issue: #56071
    bors committed Nov 21, 2022
    Copy the full SHA
    49357d0 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #103491 - cjgillot:self-rpit, r=oli-obk

    Support using `Self` or projections inside an RPIT/async fn
    
    I reuse the same idea as rust-lang/rust#103449 to use variances to encode whether a lifetime parameter is captured by impl-trait.
    
    The current implementation of async and RPIT replace all lifetimes from the parent generics by `'static`.  This PR changes the scheme
    ```rust
    impl<'a> Foo<'a> {
        fn foo<'b, T>() -> impl Into<Self> + 'b { ... }
    }
    
    opaque Foo::<'_a>::foo::<'_b, T>::opaque<'b>: Into<Foo<'_a>> + 'b;
    impl<'a> Foo<'a> {
        // OLD
        fn foo<'b, T>() -> Foo::<'static>::foo::<'static, T>::opaque::<'b> { ... }
                                 ^^^^^^^ the `Self` becomes `Foo<'static>`
    
        // NEW
        fn foo<'b, T>() -> Foo::<'a>::foo::<'b, T>::opaque::<'b> { ... }
                                 ^^ the `Self` stays `Foo<'a>`
    }
    ```
    
    There is the same issue with projections. In the example, substitute `Self` by `<T as Trait<'b>>::Assoc` in the sugared version, and `Foo<'_a>` by `<T as Trait<'_b>>::Assoc` in the desugared one.
    
    This allows to support `Self` in impl-trait, since we do not replace lifetimes by `'static` any more.  The same trick allows to use projections like `T::Assoc` where `Self` is allowed.  The feature is gated behind a `impl_trait_projections` feature gate.
    
    The implementation relies on 2 tweaking rules for opaques in 2 places:
    - we only relate substs that correspond to captured lifetimes during TypeRelation;
    - we only list captured lifetimes in choice region computation.
    
    For simplicity, I encoded the "capturedness" of lifetimes as a variance, `Bivariant` vs `Invariant` for unused vs captured lifetimes. The `variances_of` query used to ICE for opaques.
    
    Impl-trait that do not reference `Self` or projections will have their variances as:
    - `o` (invariant) for each parent type or const;
    - `*` (bivariant) for each parent lifetime --> will not participate in borrowck;
    - `o` (invariant) for each own lifetime.
    
    Impl-trait that does reference `Self` and/or projections will have some parent lifetimes marked as `o` (as the example above), and participate in type relation and borrowck.  In the example above, `variances_of(opaque) = ['_a: o, '_b: *, T: o, 'b: o]`.
    
    r? types
    cc `@compiler-errors` , as you asked about the issue with `Self` and projections.
    bors committed Nov 21, 2022
    Copy the full SHA
    e11e78b View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2022

  1. Auto merge of #103947 - camsteffen:place-clones, r=cjgillot

    Reduce `PlaceBuilder` cloning
    
    Some API tweaks with an eye towards reducing clones.
    bors committed Nov 23, 2022
    Copy the full SHA
    84a2c00 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #104410 - WaffleLapkin:unregress, r=estebank

    Fix perf regression by correctly matching keywords
    
    This should (hopefully) fix regression from #99918
    
    r? `@estebank`
    bors committed Nov 23, 2022
    Copy the full SHA
    353c9b6 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2022

  1. Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser

    Use `as_deref` in compiler (but only where it makes sense)
    
    This simplifies some code :3
    
    (there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
    bors committed Nov 24, 2022
    Copy the full SHA
    2f18cf4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #104610 - ouz-a:revert-overflow, r=compiler-errors

    Reverts check done by #100757
    
    As my `fix` caused more issues than it resolved it's better to revert it.
    ( #103274 #104322 rust-lang/rust#104606)
    
    r? `@compiler-errors`
    
    Reopens #95134
    bors committed Nov 24, 2022
    Copy the full SHA
    7edf87a View commit details
    Browse the repository at this point in the history
  3. Auto merge of #103808 - cjgillot:vec-cache, r=TaKO8Ki

    Use an IndexVec to cache queries with index-like key
    
    Revival of an old idea. Let's see if it has more effect.
    
    r? `@ghost`
    bors committed Nov 24, 2022
    Copy the full SHA
    bc94be2 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2022

  1. Auto merge of #104650 - BlackHoleFox:stuck-with-xcode-13, r=Mark-Simu…

    …lacrum
    
    Build macOS distribution artifacts with XCode 13
    
    After all of the `rust-lang/rust` Apple runners started using macOS 12, the builds created by CI began to use XCode 14.0.1. Due to this (as far as we can tell), XCode's build tools started to ignore the `MACOSX_DEPLOYMENT_TARGET` being defined by us for the distributed builds that let both `rustc` and `libstd` work on older versions. The current idea is that since XCode 14's macOS SDK doesn't support deployment targets before 10.13, it uses some default of its own. You can see the difference between stable's and the most recent nighty's supported versions [here](rust-lang/rust#104570 (comment)).
    
    I wasn't able to confirm my SDK versioning hypothesis locally since I think there's something jammed with my XCode installation, but hopefully this should still fix it for releases.
    
    Closes rust-lang/rust#104570
    
    r? `@Mark-Simulacrum`
    bors committed Nov 25, 2022
    Copy the full SHA
    dab0c4a View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2022

  1. Auto merge of #104431 - alistair23:alistair/rv64-profiler, r=Mark-Sim…

    …ulacrum
    
    Enable profiler in dist-riscv64-linux
    
    Build the profiler runtime to allow using -C profile-generate and -C instrument-coverage on riscv64-linux.
    
    Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
    bors committed Nov 26, 2022
    Copy the full SHA
    85a496a View commit details
    Browse the repository at this point in the history
  2. Auto merge of #103556 - clubby789:specialize-option-partial-eq, r=sco…

    …ttmcm
    
    Manually implement PartialEq for Option<T> and specialize non-nullable types
    
    This PR manually implements `PartialEq` and `StructuralPartialEq` for `Option`, which seems to produce slightly better codegen than the automatically derived implementation.
    
    It also allows specializing on the `core::num::NonZero*` and `core::ptr::NonNull` types, taking advantage of the niche optimization by transmuting the `Option<T>` to `T` to be compared directly, which can be done in just two instructions.
    
    A comparison of the original, new and specialized code generation is available [here](https://godbolt.org/z/dE4jxdYsa).
    bors committed Nov 26, 2022
    Copy the full SHA
    8feb79e View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2022

  1. Copy the full SHA
    0d54528 View commit details
    Browse the repository at this point in the history
  2. Merge from rustc

    RalfJung committed Nov 27, 2022
    Copy the full SHA
    dd720db View commit details
    Browse the repository at this point in the history
  3. advice on josh pushing

    RalfJung committed Nov 27, 2022
    Copy the full SHA
    90b20c5 View commit details
    Browse the repository at this point in the history
  4. clippy

    RalfJung committed Nov 27, 2022
    Copy the full SHA
    55aa540 View commit details
    Browse the repository at this point in the history