Skip to content

Rollup of 9 pull requests #140377

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

Closed
wants to merge 22 commits into from
Closed

Conversation

ChrisDenton
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lolbinarycat and others added 22 commits April 8, 2025 12:27
nest under platform-specific behavior,
factor rationale into its own section,
and tweak language.
This will help with hiding some options in `--help`
This improves consistency with commonly expected CLI conventions,
avoiding a common stutter people make when running tests (trying what
they expect and then having to check the docs to then user whats
accepted).

An alternative could have been to take a value, like `--capture <value>` (e.g. `pytest` does this).
Overall, we're shifting focus for features to custom test harnesses (see rust-lang#134283).
Most of `pytest`s modes will likely be irrelevant in that situation.
As for the rest, its too early to tell which, if any, may be relevant,
so we're sticking with this small, quality of life improvement.

By deprecating `--nocapture`, we intend that custom test harnesses do
not need to support it for reasons outside of their own compatibility
requirements, much like the deprecation in rust-lang#134283

I'm punting for now on the naming of `RUST_TEST_NOCAPTURE`.
I feel like T-testing-devex should do a wider look at environment
variables role in lib`test` before evaluating whether to
- Deprecate it in favor of the user passing CLI flags or the test runner
  providing its own config
- Deprecate in favor of `RUST_TEST_NO_CAPTURE`
- Deprecate in favor of `RUST_TEST_CAPTURE`

Other CLI flags were evaluated for casing consistency:
- `--logfile` has the same problem but was deprecated in rust-lang#134283

Fixes rust-lang#133073
- Bump up the version to 5.2.0

Signed-off-by: Ayush Singh <[email protected]>
The def path printer in `get_def_path` essentially calls
`Symbol::intern(&symbol.to_string())` for simple symbols in a path.
This accounts for ~30% of the runtime of get_def_path.

We can avoid this by simply appending the symbol directly when available.
This regression appeared in 916cfbc.
The change is behaving as expected (a non-glob re-export uses the
stability marker on the `use` item, not the original one), but
this part of the standard library didn't follow it.
…ulacrum

Download GCC from CI on test builders

This should reduce the duration of the `x86_64-gnu-llvm-18` job, which runs on PR CI, which is currently the only one that builds GCC (outside of the x64 dist builder).

Since we handle the GCC download in the GCC step, and not eagerly in config, we can set this flag globally across all test builders, as it won't do anything unless they actually try to build GCC.

Opening as a draft to test if it works on CI, because I still need to implement logic to avoid the download if there are any local modifications to GCC (essentially the "if-unchanged" mode, although I want to try something a bit different).

r? ``@ghost``
uefi: Update r-efi

- Bump up the version to 5.2.0

try-job: x86_64-gnu-distcheck
try-job: x86_64-gnu
try-job: test-various
…oss35

Add `Arc::is_unique`

Adds

```rs
impl<T> Arc<T> {
    pub fn is_unique(this: &Self) -> bool;
}
```

Tracking issue: rust-lang#138938
ACP: rust-lang/libs-team#560
fix(test): Expose '--no-capture' in favor of `--nocapture`

This improves consistency with commonly expected CLI conventions,
avoiding a common stutter people make when running tests (trying what
they expect and then having to check the docs to then user whats
accepted).

An alternative could have been to take a value, like `--capture <value>` (e.g. `pytest` does this).
Overall, we're shifting focus for features to custom test harnesses (see rust-lang#134283).
Most of `pytest`s modes will likely be irrelevant in that situation.
As for the rest, its too early to tell which, if any, may be relevant,
so we're sticking with this small, quality of life improvement.

I expect we'll warn about `--nocapture` being deprecated in the future after a sufficient transition period has been allowed.
By deprecating `--nocapture`, we intend that custom test harnesses do
not need to support it for reasons outside of their own compatibility
requirements, much like the deprecation in rust-lang#134283

I'm punting for now on the naming of `RUST_TEST_NOCAPTURE`.
I feel like T-testing-devex should do a wider look at environment
variables role in lib`test` before evaluating whether to
- Deprecate it in favor of the user passing CLI flags or the test runner
  providing its own config
- Deprecate in favor of `RUST_TEST_NO_CAPTURE`
- Deprecate in favor of `RUST_TEST_CAPTURE`

Other CLI flags were evaluated for casing consistency:
- `--logfile` has the same problem but was deprecated in rust-lang#134283

Regarding the implementation, I moved `--nocapture` out of `optgroups()`, into `parse_opts()`, out of an abundance of caution in passing the options without a deprecated value to the usage generation.  However, the usage does not actually show optional flags, so this could potentially be dropped, simplifying the PR.

Note: `compiletest` added `--no-capture` instead of `--nocapture` in rust-lang#134809

T-testing-devex FCP: rust-lang#133073 (comment)

Fixes rust-lang#133073
…5942, r=thomcc

std(docs): clarify how std::fs::set_permisions works with symlinks

fixes rust-lang#75942
fixes rust-lang#124201
…Simulacrum

crashes: more tests

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
Avoid re-interning in `LateContext::get_def_path`

The def path printer in `get_def_path` essentially calls `Symbol::intern(&symbol.to_string())` for simple symbols in a path. This accounts for ~30% of the runtime of get_def_path.

We can avoid this by simply appending the symbol directly when available.
… r=thomcc

docs: fix incorrect stability markers on `std::{todo, matches}`

This regression appeared in 916cfbc. The change is behaving as expected (a non-glob re-export uses the stability marker on the `use` item, not the original one), but this part of the standard library didn't follow it.

Fixes rust-lang#140344
specify explicit safety guidance for from_utf8_unchecked

The PR addresses missing safety guidelines in two APIs by adding explicit text to the cross-linked reference.
@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. rollup A PR which is a rollup labels Apr 28, 2025
@ChrisDenton
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 28, 2025

📌 Commit fd10438 has been approved by ChrisDenton

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 Apr 28, 2025
@bors
Copy link
Collaborator

bors commented Apr 28, 2025

⌛ Testing commit fd10438 with merge 03ffc9f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2025
…enton

Rollup of 9 pull requests

Successful merges:

 - rust-lang#138395 (Download GCC from CI on test builders)
 - rust-lang#138737 (uefi: Update r-efi)
 - rust-lang#138939 (Add `Arc::is_unique`)
 - rust-lang#139224 (fix(test): Expose '--no-capture' in favor of `--nocapture`)
 - rust-lang#139546 (std(docs): clarify how std::fs::set_permisions works with symlinks)
 - rust-lang#139883 (crashes: more tests)
 - rust-lang#140345 (Avoid re-interning in `LateContext::get_def_path`)
 - rust-lang#140351 (docs: fix incorrect stability markers on `std::{todo, matches}`)
 - rust-lang#140359 (specify explicit safety guidance for from_utf8_unchecked)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-19 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#18 exporting to docker image format
#18 sending tarball 20.6s done
#18 DONE 26.8s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--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', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build          := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
test [crashes] tests/crashes/137916.rs ... ok
test [crashes] tests/crashes/138166.rs ... ok
test [crashes] tests/crashes/138009.rs ... ok
test [crashes] tests/crashes/138089.rs ... ok
2025-04-28T01:52:21.450193Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/138214.rs ... FAILED
test [crashes] tests/crashes/138008.rs ... ok
test [crashes] tests/crashes/138156.rs ... ok
test [crashes] tests/crashes/138240.rs ... ok
test [crashes] tests/crashes/138265.rs ... ok
---
failures:

---- [crashes] tests/crashes/138214.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/138214.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@ChrisDenton
Copy link
Member Author

@bors r-
@bors retry

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2025
@ChrisDenton ChrisDenton deleted the rollup-sec6d4x branch April 28, 2025 02:01
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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.