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

Closed
wants to merge 17 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

workingjubilee and others added 17 commits June 24, 2024 16:54
Otherwise the types might not match

Fixes 127089
…piler_builtins`

Formerly the `loongarch*-*-none*` targets were added to the
`dist-various-2` CI job, but no corresponding toolchain was added along
with them. This meant the `compiler_builtins` for the targets were built
with the host toolchain.

As the other `dist-various` toolchains are mostly pre-built so far, to
avoid burdening them with crosstool-ng builds, simply move the two
bare-metal LoongArch targets to the `dist-loongarch64-linux` job which
has a ready-to-use LoongArch toolchain. With the proper CFLAGS applied
it is possible to build artifacts suitable for bare-metal. I verified
that the `compiler_builtins` objects are now correctly produced
regarding architecture and ABI, with the changes here applied.

Fixes rust-lang#125908.

cc @heiher

try-job: dist-loongarch64-linux
try-job: dist-various-2
…r-simd-invalid-bitcast, r=calebzulawski

test: dont optimize to invalid bitcasts

Regression tests to prevent regressing.
Reduce merge conflicts from rustfmt's wrapping

Imports in this file are changed by many different features. Rustfmt insists on reformatting and rewrapping the imports every time they change, which causes chronic merge conflicts.

I've split the big import into multiple smaller ones, so that different features will conflict less often.
…dtolnay

impl FusedIterator and a size hint for the error sources iter

cc tracking issue rust-lang#58520
Only update `Eq` operands in GVN if it can update both sides

Otherwise the types might not match

Fixes rust-lang#127089

r? mir-opt
Fix x86_64 code being produced for bare-metal LoongArch targets' `compiler_builtins`

Formerly the `loongarch*-*-none*` targets were added to the `dist-various-2` CI job, but no corresponding toolchain was added along with them. This meant the `compiler_builtins` for the targets were built with the host toolchain.

As the other `dist-various` toolchains are mostly pre-built so far, to avoid burdening them with crosstool-ng builds, simply move the two bare-metal LoongArch targets to the `dist-loongarch64-linux` job which has a ready-to-use LoongArch toolchain. With the proper CFLAGS applied it is possible to build artifacts suitable for bare-metal. I verified that the `compiler_builtins` objects are now correctly produced regarding architecture and ABI, with the changes here applied.

Fixes rust-lang#125908.

cc `@heiher`

try-job: dist-loongarch64-linux
try-job: dist-various-2
…er-errors

Introduce a `rustc_` attribute to dump all the `DefId` parents of a `DefId`

We've run into a bunch of issues with anon consts having the wrong generics and it would have been incredibly helpful to be able to quickly slap a `rustc_` attribute to check what `tcx.parent(` will return on the relevant DefIds.

I wasn't sure of a better way to make this work for anon consts than requiring the attribute to be on the enclosing item and then walking the inside of it to look for any anon consts. This particular method will honestly break at some point when we stop having a `DefId` available for anon consts in hir but that's for another day...

r? `@compiler-errors`
Fix error in documentation for IpAddr::to_canonical and Ipv6Addr::to_canonical
…ro-calls, r=compiler-errors

Ensure `out_of_scope_macro_calls` lint is registered

Fixes part of rust-lang#126984 (comment).
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 1, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Jul 1, 2024

📌 Commit fc90d13 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2024
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Getting action download info
Download action repository 'msys2/setup-msys2@v2.22.0' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea)
Download action repository 'actions/checkout@v4' (SHA:692973e3d937129bcbf40652eb9f2f61becf3332)
Download action repository 'actions/upload-artifact@v4' (SHA:65462800fd760344b1a7b4382951275a0abb4808)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \
    && pip3 install virtualenv
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/

# NOTE: intentionally uses python2 for x.py so we can test it still works.
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
           --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---

#9 [4/8] RUN sh /scripts/sccache.sh
#9 CACHED

#10 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv

#11 [5/8] COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
#11 CACHED

---
DirectMap4k:      184256 kB
DirectMap2M:     7155712 kB
DirectMap1G:    11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
    Finished `dev` profile [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/f92a6c41e644d6222be77b20396daec5e77661f3/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-f92a6c41e644d6222be77b20396daec5e77661f3-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished `release` profile [optimized] target(s) in 27.86s
##[endgroup]
fmt check
##[error]Diff in /checkout/library/core/src/error.rs at line 1010:
 
 
     fn size_hint(&self) -> (usize, Option<usize>) {
-        if self.current.is_some() {
-            (1, None)
-            (0, Some(0))
-        }
-        }
+        if self.current.is_some() { (1, None) } else { (0, Some(0)) }
 }
 
 
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/library/core/tests/iter/adapters/peekable.rs" "/checkout/library/core/tests/iter/adapters/map_windows.rs" "/checkout/library/core/tests/iter/adapters/take.rs" "/checkout/library/core/tests/iter/adapters/take_while.rs" "/checkout/library/core/tests/iter/adapters/inspect.rs" "/checkout/library/core/tests/iter/adapters/mod.rs" "/checkout/library/core/tests/iter/adapters/by_ref_sized.rs" "/checkout/library/core/tests/iter/adapters/map.rs" "/checkout/library/core/tests/iter/adapters/zip.rs" "/checkout/library/core/tests/iter/adapters/copied.rs" "/checkout/library/core/tests/iter/adapters/step_by.rs" "/checkout/library/core/tests/iter/adapters/flatten.rs" "/checkout/library/core/tests/iter/adapters/intersperse.rs" "/checkout/library/core/tests/iter/adapters/cycle.rs" "/checkout/library/core/tests/iter/adapters/filter_map.rs" "/checkout/library/core/tests/iter/adapters/enumerate.rs" "/checkout/library/core/tests/iter/adapters/array_chunks.rs" "/checkout/library/core/tests/iter/adapters/fuse.rs" "/checkout/library/core/tests/iter/adapters/skip_while.rs" "/checkout/library/core/tests/iter/adapters/skip.rs" "/checkout/library/core/tests/iter/adapters/flat_map.rs" "/checkout/library/core/tests/iter/traits/mod.rs" "/checkout/library/core/tests/iter/traits/iterator.rs" "/checkout/library/core/tests/iter/traits/accum.rs" "/checkout/library/core/tests/iter/traits/double_ended.rs" "/checkout/library/core/tests/iter/traits/step.rs" "/checkout/library/core/tests/iter/range.rs" "/checkout/library/core/tests/iter/sources.rs" "/checkout/library/core/tests/bool.rs" "/checkout/library/core/tests/alloc.rs" "/checkout/library/core/src/panic.rs" "/checkout/library/core/src/asserting.rs" "/checkout/library/core/src/pat.rs" "/checkout/library/core/src/error.rs" "/checkout/library/core/src/cmp.rs" "/checkout/library/core/src/unit.rs" "/checkout/library/core/src/slice/specialize.rs" "/checkout/library/core/src/slice/cmp.rs" "/checkout/library/core/src/slice/ascii.rs" "/checkout/library/core/src/slice/mod.rs" "/checkout/library/core/src/slice/memchr.rs" "/checkout/library/core/src/slice/rotate.rs" "/checkout/library/core/src/slice/iter.rs" "/checkout/library/core/src/slice/index.rs" "/checkout/library/core/src/slice/raw.rs" "/checkout/library/core/src/slice/sort/mod.rs" "/checkout/library/core/src/slice/sort/shared/mod.rs" "/checkout/library/core/src/slice/sort/shared/pivot.rs" "/checkout/library/core/src/slice/sort/shared/smallsort.rs" "/checkout/library/core/src/slice/sort/select.rs" "/checkout/library/core/src/slice/sort/stable/drift.rs" "/checkout/library/core/src/slice/sort/stable/mod.rs" "/checkout/library/core/src/slice/sort/stable/quicksort.rs" "/checkout/library/core/src/slice/sort/stable/merge.rs" "/checkout/library/core/src/slice/sort/unstable/mod.rs" "/checkout/library/core/src/slice/sort/unstable/quicksort.rs" "/checkout/library/core/src/slice/sort/unstable/heapsort.rs" "/checkout/library/core/src/slice/iter/macros.rs" "/checkout/library/core/src/tuple.rs" "/checkout/library/core/src/any.rs" "/checkout/library/core/src/marker.rs" "/checkout/library/core/src/prelude/mod.rs" "/checkout/library/core/src/prelude/common.rs" "/checkout/library/core/tests/iter/adapters/chain.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
  local time: Mon Jul  1 06:41:06 UTC 2024
  network time: Mon, 01 Jul 2024 06:41:06 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@matthiaskrgr matthiaskrgr deleted the rollup-u6cjmch branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.