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

Closed
wants to merge 19 commits into from

Commits on Apr 2, 2024

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

Commits on Apr 26, 2024

  1. Add "safety" comment

    mgeier committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    22319bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4df1303 View commit details
    Browse the repository at this point in the history
  3. Add missing .into_iter()

    mgeier committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    30b676c View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    fe52b54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bfb7757 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6e31349 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. Configuration menu
    Copy the full SHA
    1462f3d View commit details
    Browse the repository at this point in the history
  2. Simplify [T; N]::try_map signature

    People keep making fun of this signature for being so gnarly.
    Associated type bounds lend it a much simpler scribbling.
    ChangeOutputType can also come along for the ride.
    workingjubilee committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    d695544 View commit details
    Browse the repository at this point in the history
  3. Make issue-122805.rs big endian compatible

    Instead of not generating the function at all on big endian (which
    makes the CHECK lines fail), instead use to_le() on big endian,
    so that we essentially perform a bswap for both endiannesses.
    nikic committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    26fa5c2 View commit details
    Browse the repository at this point in the history
  4. Make storage-live.rs robust against rustc internal changes.

    Currently it can be made to fail by rearranging code within
    `compiler/rustc_mir_transform/src/lint.rs`.
    nnethercote committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    1a60597 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Rollup merge of rust-lang#123374 - mgeier:doc-slice-from-raw-parts, r…

    …=scottmcm
    
    DOC: Add FFI example for slice::from_raw_parts()
    
    For some discussion, see https://users.rust-lang.org/t/missing-guidance-on-converting-ffi-ptr-length-to-slice/106048
    
    See also rust-lang#120608.
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    a53da66 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#126210 - lolbinarycat:ptr_doctest_assert, r…

    …=workingjubilee
    
    docs(core): make more const_ptr doctests assert instead of printing
    
    improves on rust-lang#124669
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    fa02a77 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#126228 - BoxyUwU:nested_repeat_expr_generic…

    …s, r=compiler-errors
    
    Provide correct parent for nested anon const
    
    Fixes rust-lang#126147
    
    99% of this PR is just comments explaining what the issue is.
    
    `tcx.parent(` and `hir().get_parent_item(` give different results as the hir owner for all the hir of anon consts is the enclosing function. I didn't attempt to change that as being a hir owner requires a `DefId` and long term we want to stop creating anon consts' `DefId`s before hir ty lowering.
    
    So i just opted to change `generics_of` to use `tcx.parent` to get the parent for `AnonConst`'s. I'm not entirely sure about this being what we want, it does seem weird that we have two ways of getting the parent of an `AnonConst` and they both give different results.
    
    Alternatively we could just go ahead and make `const_evaluatable_unchecked` a hard error and stop providing generics to repeat exprs. Then this isn't an issue. (The FCW has been around for almost 4 years now)
    
    r? ``@compiler-errors``
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    092b0fb View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#126242 - yaahc:simplify-provider, r=jhpratt

    Simplify provider api to improve llvm ir
    
    This PR seeks to resolve the last concern in rust-lang#99301 (comment)
    
    We resolve the issue by moving the type_id to be stored in the `Request` itself rather than being accessed through the `Erased` trait, letting the compiler infer that the value of the type id will not change between lookups.
    
    ### LLVM Codegen
    
    **Before**
    
    ```
    ; <provider_test::MyError as core::error::Error>::provide
    ; Function Attrs: nonlazybind uwtable
    define void `@"_ZN61_$LT$provider_test..MyError$u20$as$u20$core..error..Error$GT$7provide17hd9c9de412063aa73E"(ptr` noalias nocapture noundef nonnull readonly align 1 %self, ptr noundef nonnull align 1 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(32) %request.1) unnamed_addr #0 personality ptr `@rust_eh_personality` {
    start:
      %0 = getelementptr inbounds i8, ptr %request.1, i64 24
      %self.1.val.i = load ptr, ptr %0, align 8
      %1 = tail call { i64, i64 } %self.1.val.i(ptr noundef nonnull align 1 %request.0), !noalias !15
      %2 = extractvalue { i64, i64 } %1, 0
      %3 = extractvalue { i64, i64 } %1, 1
      %_18.i.i = icmp ne i64 %2, 1101338453689927725
      %_2.i.i = icmp ne i64 %3, 472224167662714873
      %or.cond.i.not.i = select i1 %_18.i.i, i1 true, i1 %_2.i.i
      br i1 %or.cond.i.not.i, label %_ZN4core5error7Request7provide17h8f8125d2543333e0E.exit, label %bb2.i
    ```
    
    **After**
    
    ```
    ; <provider_test::MyError as provider_test::Error>::provide
    ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable
    define void `@"_ZN63_$LT$provider_test..MyError$u20$as$u20$provider_test..Error$GT$7provide17h5bbf091795a6d359E"(ptr` noalias nocapture noundef nonnull readonly align 1 %self, ptr nocapture noundef nonnull align 8 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %request.1) unnamed_addr rust-lang#2 personality ptr `@rust_eh_personality` {
    start:
      %_19.i = load i64, ptr %request.0, align 8, !noalias !3, !noundef !3
      switch i64 %_19.i, label %_ZN13provider_test7Request7provide17heb3ee140962e3b2fE.exit [
        i64 7665305208997882008, label %bb12.i
        i64 7050211241160863540, label %bb12.i3
        i64 9112786072622981063, label %bb12.i11
      ]
    ```
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    d412d51 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#126249 - workingjubilee:simplify-try-map-si…

    …gnature, r=scottmcm
    
    Simplify `[T; N]::try_map` signature
    
    People keep making fun of this signature for being so gnarly.
    Associated type bounds admit a much simpler scribbling.
    
    r? ``@scottmcm``
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    68d9dcd View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#126256 - ferrocene:lw-target-subst, r=alber…

    …tlarsan68
    
    Add {{target}} substitution to compiletest
    
    In ferrocene we have ui tests testing the cli interface of the compiler, one of which tests the `--target` flag. To be able to run this on all targets we require a way to specify a valid target in the `compile-flags` directive that is target independent, as otherwise we can only run the test against the one target we choose to supply in the flags. See https://github.com/ferrocene/ferrocene/blob/383cbc80f4e85859a4055f121f15dac329908346/tests/ui/ferrocene/compiler-arguments/target/target.rs
    
    We figured the project might be able to make use of this substitution as well in the future.
    
    try-job: dist-x86_64-msvc
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    095fd15 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#126263 - nikic:s390x-codegen-test-fix, r=ji…

    …eyouxu
    
    Make issue-122805.rs big endian compatible
    
    Instead of not generating the function at all on big endian (which makes the CHECK lines fail), instead use to_le() on big endian, so that we essentially perform a bswap for both endiannesses.
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    e644975 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#126286 - nnethercote:fix-test-LL-CC, r=lqd

    Make `storage-live.rs` robust against rustc internal changes.
    
    Currently it can be made to fail by rearranging code within `compiler/rustc_mir_transform/src/lint.rs`.
    
    This is a precursor to rust-lang#125443.
    
    r? `@lqd`
    workingjubilee committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    8e25298 View commit details
    Browse the repository at this point in the history