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 5 pull requests #128566

Closed
wants to merge 22 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

EtomicBomb and others added 22 commits July 29, 2024 14:33
It has a single use. This makes the `let` handling case in
`parse_stmt_without_recovery` more similar to the statement path and
statement expression cases.
`parse_expr_assoc_with` has an awkward structure -- sometimes the lhs is
already parsed. This commit splits the post-lhs part into a new method
`parse_expr_assoc_rest_with`, which makes everything shorter and
simpler.
It can be done more concisely.
When collecting tokens there are two kinds of range:
- a range relative to the parser's full token stream (which we get when
  we are parsing);
- a range relative to a single AST node's token stream (which we use
  within `LazyAttrTokenStreamImpl` when replacing tokens).

These are currently both represented with `Range<u32>` and it's easy to
mix them up -- until now I hadn't properly understood the difference.

This commit introduces `ParserRange` and `NodeRange` to distinguish
them. This also requires splitting `ReplaceRange` in two, giving the new
types `ParserReplacement` and `NodeReplacement`. (These latter two names
reduce the overloading of the word "range".)

The commit also rewrites some comments to be clearer.

The end result is a little more verbose, but much clearer.
Add the feature in `core/lib.rs`
The one use of it was guaranteed to be always true.
…-Simulacrum

Promote riscv64gc-unknown-linux-musl to tier 2
Added SHA512, SM3, SM4 target-features and `sha512_sm_x86` feature gate

This is an effort towards rust-lang#126624. This adds support for these 3 target-features and introduces the feature flag `sha512_sm_x86`, which would gate these target-features and the yet-to-be-implemented detection and intrinsics in stdarch.
…riddle

nested aux-build in tests/rustdoc/ tests

* Fixes bug that prevented using nested aux-build in `tests/rustdoc/` tests. Before, `fn document` and the auxiliary builder disagreed about where to find the nested aux-build source file (`auxiliary/auxiliary/aux.rs` vs `auxiliary/aux.rs`), preventing them from building. Picked the latter in line with other builders in compiletest.
* Adds `//@ doc-flags` header, which forwards flags to rustdoc and not rustc.
* Adds `//@ unique-doc-out-dir` header, which sets the --out-dir for the rustdoc invocation to a unique directory: `<root out dir>/docs/<test name>/doc`
* Changes working directory of the rustdoc invocation to the root out directory (common among all aux-builds). Prior art: exec_compiled_test in runtest.rs
* Adds tests that use nested aux builds and new headers

These changes provide useful capabilities for writing rustdoc tests on their own. They are also needed to test the implementation for the [mergable-rustdoc-cross-crate-info](rust-lang/rfcs#3662) RFC.

try-job: x86_64-msvc
…s, r=petrochenkov

Still more `cfg` cleanups

Found while looking closely at `cfg`/`cfg_attr` processing code.

r? `````@petrochenkov`````
…e-this-cpuid-move-along, r=Amanieu

Finish removing `has_cpuid`

The one use of it was guaranteed to be always true.

try-job: test-various
@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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Aug 2, 2024

📌 Commit fc75a90 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 Aug 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#122049 (Promote riscv64gc-unknown-linux-musl to tier 2)
 - rust-lang#126704 (Added SHA512, SM3, SM4 target-features and `sha512_sm_x86` feature gate)
 - rust-lang#128161 (nested aux-build in tests/rustdoc/ tests)
 - rust-lang#128483 (Still more `cfg` cleanups)
 - rust-lang#128528 (Finish removing `has_cpuid`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Aug 2, 2024

⌛ Testing commit fc75a90 with merge a21a058...

@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
# Luckily one of the folders is /usr/local/include so symlink /usr/include/x86_64-linux-gnu/asm there
RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm

ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \
  --musl-root-armv7=/musl-armv7 \
  --musl-root-riscv64gc=/musl-riscv64gc
ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS
#!/usr/bin/env bash

set -ex
---
#6 [internal] load build context
#6 transferring context: 11.65kB done
#6 DONE 0.0s

#10 [10/25] RUN env     CC=arm-linux-gnueabi-gcc-9 CFLAGS="-march=armv7-a"     CXX=arm-linux-gnueabi-g++-9 CXXFLAGS="-march=armv7-a"     bash musl.sh armv7 &&     env     CC=riscv64-linux-gnu-gcc     CXX=riscv64-linux-gnu-g++     bash musl.sh riscv64gc &&     rm -rf /build/*

#11 [13/25] COPY scripts/build-fuchsia-toolchain.sh /tmp/
#11 CACHED

---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--enable-extended', '--enable-lld', '--enable-llvm-bitcode-linker', '--disable-docs', '--musl-root-armv7=/musl-armv7', '--musl-root-riscv64gc=/musl-riscv64gc', '--set', 'change-id=99999999', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-llvm-static-stdcpp', '--set', 'rust.remap-debuginfo', '--debuginfo-level-std=1', '--set', 'rust.codegen-backends=llvm']
configure: rust.lld             := True
configure: rust.llvm-bitcode-linker := True
configure: build.docs           := False
configure: target.armv7-unknown-linux-musleabi.musl-root := /musl-armv7
---
[RUSTC-TIMING] gimli test:false 4.695
[RUSTC-TIMING] object test:false 5.474
error: linking with `/musl-riscv64gc/bin/musl-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "/musl-riscv64gc/bin/musl-gcc" "-Wl,--version-script=/tmp/rustcovfzH1/list" "-Wl,--no-undefined-version" "/tmp/rustcovfzH1/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/std-0675bbb7d4c39b15.std.6c0a52086854d6d8-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/std-0675bbb7d4c39b15.0srhxbyr4ftstwg6lxw1z9ea1.rcgu.rmeta" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/std-0675bbb7d4c39b15.71bmvtiksa2zfaewb5f07t18v.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps" "-L" "/musl-riscv64gc/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/build/compiler_builtins-c55fdc7cfe977a53/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/riscv64gc-unknown-linux-musl/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libpanic_unwind-6fd559a34c85bf60.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libobject-fbae37e5a875540e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libmemchr-1e1d6982effef98d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libaddr2line-665cefe3826cb5e7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libgimli-3957dfd589d6df76.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/librustc_demangle-a6fbfa6ab228621e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libstd_detect-c15cca8fb1d65fde.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libhashbrown-6f63c75dc3b70d14.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/librustc_std_workspace_alloc-4eb012591b5ccecc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libminiz_oxide-ee17c537bf8f2b2d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libadler-504f326975593b65.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libunwind-7bf8ff199ae4d602.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libcfg_if-614633279ca92d36.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/liblibc-b947b511214e193b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/liballoc-05dc283642b5ecea.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/librustc_std_workspace_core-02ee51ecae839f31.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libcore-54cb426109ce94ca.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libcompiler_builtins-cd8d685a82c6cc1b.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/riscv64gc-unknown-linux-musl/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/riscv64gc-unknown-linux-musl/release/deps/libstd-0675bbb7d4c39b15.so" "-shared" "-Wl,-soname=libstd-0675bbb7d4c39b15.so" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib"
  = note: /usr/lib/gcc-cross/riscv64-linux-gnu/11/../../../../riscv64-linux-gnu/bin/ld: cannot find libgcc_s.so.1: No such file or directory
          

[RUSTC-TIMING] std test:false 15.977
error: could not compile `std` (lib) due to 1 previous error

@bors
Copy link
Contributor

bors commented Aug 2, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 2, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Aug 2, 2024

@bors r-

@jieyouxu jieyouxu closed this Aug 2, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-fcch62d branch September 1, 2024 17:35
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-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants