Skip to content

Rollup of 8 pull requests #140378

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

Merged
merged 20 commits into from
Apr 28, 2025
Merged

Rollup of 8 pull requests #140378

merged 20 commits into from
Apr 28, 2025

Conversation

ChrisDenton
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lolbinarycat and others added 20 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
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 0ae362b has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 28, 2025
@bors
Copy link
Collaborator

bors commented Apr 28, 2025

⌛ Testing commit 0ae362b with merge 21079f53a359d9fc82668d4175d49dafdb600563...

@bors
Copy link
Collaborator

bors commented Apr 28, 2025

☀️ Test successful - checks-actions
Approved by: ChrisDenton
Pushing 21079f5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 28, 2025
@bors bors merged commit 21079f5 into rust-lang:master Apr 28, 2025
1 check passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 28, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing deb9479 (parent) -> 21079f5 (this PR)

Test differences

Show 33230 test diffs

Stage 1

  • fs::tests::copy_src_does_not_exist: [missing] -> pass (J0)
  • fs::tests::test_file_times: [missing] -> pass (J0)
  • linked_list::bench_push_front: [missing] -> pass (J0)
  • net::tcp::tests::read_buf: [missing] -> pass (J0)
  • slice::sort_unstable_large_strings: [missing] -> pass (J0)
  • str::find_underscore_char::short_pile_of_poo: [missing] -> pass (J0)
  • errors::verify_builtin_macros_asm_unsupported_operand_82: [missing] -> pass (J1)
  • errors::verify_codegen_ssa_target_feature_safe_trait_128: [missing] -> pass (J1)
  • errors::verify_passes_outer_crate_level_attr_4: [missing] -> pass (J1)
  • errors::verify_passes_panic_unwind_without_std_108: [missing] -> pass (J1)
  • errors::verify_session_soft_float_deprecated_51: [missing] -> pass (J1)
  • html::length_limit::tests::empty: [missing] -> pass (J1)
  • lints::verify_lint_unused_extern_crate_141: [missing] -> pass (J1)
  • server_impl::token_id::tests::test_ra_server_from_str: [missing] -> pass (J1)
  • spec::tests::i686_unknown_freebsd: [missing] -> pass (J1)
  • spec::tests::thumbv8m_base_nuttx_eabi: [missing] -> pass (J1)
  • spec::tests::x86_64_unknown_linux_gnu: [missing] -> pass (J1)
  • symbols::tests::check_dup_symbol_and_keyword: [missing] -> pass (J1)
  • tests::misformed_fluent: [missing] -> pass (J1)
  • collections::btree::map::tests::test_cursor_mut_insert_after_2: [missing] -> pass (J2)
  • collections::btree::map::tests::test_values_mut_mutation: [missing] -> pass (J2)
  • collections::btree::set::tests::test_split_off_empty_left: [missing] -> pass (J2)
  • collections::hash::map::tests::test_drops: [missing] -> pass (J2)
  • collections::vec_deque::tests::bench_pop_back_100: [missing] -> pass (J2)
  • f32::test_algebraic: [missing] -> pass (J2)
  • f32::test_signum: [missing] -> pass (J2)
  • io::buffered::tests::bench_buffered_reader: [missing] -> pass (J2)
  • io::tests::read_line: [missing] -> pass (J2)
  • io::util::tests::take_some_bytes: [missing] -> pass (J2)
  • iter::adapters::array_chunks::test_iterator_array_chunks_count: [missing] -> pass (J2)
  • iter::extend_for_unit: [missing] -> pass (J2)
  • iter::traits::iterator::test_iterator_rev_advance_back_by: [missing] -> pass (J2)
  • net::ip_addr::ipv6_addr_to_string: [missing] -> pass (J2)
  • net::socket_addr::ipv6_socket_addr_to_string: [missing] -> pass (J2)
  • num::i32::test_midpoint: [missing] -> pass (J2)
  • num::test_try_i8i32: [missing] -> pass (J2)
  • num::u8::test_unsigned_checked_div: [missing] -> pass (J2)
  • slice::test_array_chunks_mut_remainder: [missing] -> pass (J2)
  • slice::test_chunks_zip: [missing] -> pass (J2)
  • slice::test_reverse_part: [missing] -> pass (J2)
  • sys_common::wtf8::tests::wtf8_clone_into: [missing] -> pass (J2)
  • vec::test_vec_dedup_by: [missing] -> pass (J2)
  • vec_deque::test_with_capacity: [missing] -> pass (J2)
  • sort::tests::stable::self_cmp_string_descending: [missing] -> ignore (J3)
  • sort::tests::unstable::observable_is_less_random_d2: [missing] -> ignore (J3)

Stage 2

  • ascii::is_ascii::unaligned_tail_long::case01_iter_all: pass -> [missing] (J0)
  • btree::map::iteration_mut_20: pass -> [missing] (J0)
  • btree::set::difference_random_10k_vs_10k: pass -> [missing] (J0)
  • fs::tests::copy_file_returns_metadata_len: pass -> [missing] (J0)
  • slice::zero_1kb_mut_iter: pass -> [missing] (J0)
  • sort::tests::stable::correct_1k_saw_mixed: pass -> [missing] (J0)
  • sort::tests::stable::panic_retain_orig_set_i32_random_s95: pass -> [missing] (J0)
  • sort::tests::stable::violate_ord_retain_orig_set_i32_saw_mixed: pass -> [missing] (J0)
  • sort::tests::unstable::panic_observable_is_less_ascending: pass -> [missing] (J0)
  • str::find_underscore_str::short_mixed: pass -> [missing] (J0)
  • vec::bench_chain_chain_collect: pass -> [missing] (J0)
  • vec::bench_clone_from_10_1000_1000: pass -> [missing] (J0)
  • bit_set::tests::bench_iter: pass -> [missing] (J1)
  • errors::verify_ast_lowering_await_only_in_async_fn_and_blocks_4: pass -> [missing] (J1)
  • errors::verify_builtin_macros_asm_unsupported_option_81: pass -> [missing] (J1)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_118: pass -> [missing] (J1)
  • errors::verify_codegen_ssa_linker_not_found_49: pass -> [missing] (J1)
  • errors::verify_hir_typeck_ptr_cast_add_auto_to_object_7: pass -> [missing] (J1)
  • errors::verify_mir_build_irrefutable_let_patterns_let_else_13: pass -> [missing] (J1)
  • errors::verify_mir_build_static_in_pattern_0: pass -> [missing] (J1)
  • errors::verify_monomorphize_symbol_already_defined_3: pass -> [missing] (J1)
  • errors::verify_monomorphize_wasm_c_abi_transition_11: pass -> [missing] (J1)
  • errors::verify_parse_malformed_cfg_attr_153: pass -> [missing] (J1)
  • errors::verify_parse_unmatched_angle_150: pass -> [missing] (J1)
  • errors::verify_pattern_analysis_non_exhaustive_omitted_pattern_lint_on_arm_1: pass -> [missing] (J1)
  • html::render::ordered_json::tests::escape_json_number: pass -> [missing] (J1)
  • html::render::sorted_template::tests::round_trip_html: pass -> [missing] (J1)
  • lints::verify_lint_atomic_ordering_store_90: pass -> [missing] (J1)
  • lints::verify_lint_type_ir_trait_usage_62: pass -> [missing] (J1)
  • parser::tests::parse_use: pass -> [missing] (J1)
  • session_diagnostics::verify_attr_parsing_rustc_promotable_pairing_17: pass -> [missing] (J1)
  • session_diagnostics::verify_borrowck_tail_expr_drop_order_8: pass -> [missing] (J1)
  • spec::tests::aarch64_apple_tvos_sim: pass -> [missing] (J1)
  • tests::test_typed_arena_drop_on_clear: pass -> [missing] (J1)
  • atomic::int_and: pass -> [missing] (J2)
  • collections::hash::map::tests::test_empty_remove: pass -> [missing] (J2)
  • condvar::wait_timeout_while_wake: pass -> [missing] (J2)
  • env_home_dir: pass -> [missing] (J2)
  • io::tests::chain_size_hint: pass -> [missing] (J2)
  • iter::traits::iterator::test_find: pass -> [missing] (J2)
  • num::i16::test_saturating_abs: pass -> [missing] (J2)
  • num::i8::test_is_negative: pass -> [missing] (J2)
  • num::ieee754::preserve_signed_zero: pass -> [missing] (J2)
  • num::ops::test_rem_assign_defined: pass -> [missing] (J2)
  • num::test_u8i64: pass -> [missing] (J2)
  • num::wrapping::test_wrapping_isize: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_align_to_mut_aliasing: pass -> [missing] (J2)
  • slice::test_split_last: pass -> [missing] (J2)
  • sort::tests::stable::correct_1k_random_d2: ignore -> [missing] (J3)
  • sort::tests::stable::deterministic_i32_random_s95: ignore -> [missing] (J3)
  • sort::tests::stable::self_cmp_cell_i32_random_d20: ignore -> [missing] (J3)
  • sort::tests::unstable::panic_retain_orig_set_string_descending: ignore -> [missing] (J3)
  • sort::tests::unstable::stability_cell_i32_saw_mixed: ignore -> [missing] (J3)
  • vec_deque::test_try_with_capacity: ignore -> [missing] (J3)

(and 16450 additional test diffs)

Additionally, 16680 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 21079f53a359d9fc82668d4175d49dafdb600563 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 1204.8s -> 4847.8s (302.4%)
  2. x86_64-apple-1: 4438.6s -> 9006.2s (102.9%)
  3. test-various: 2249.2s -> 4132.9s (83.8%)
  4. x86_64-gnu-aux: 4195.0s -> 5919.4s (41.1%)
  5. aarch64-apple: 3152.0s -> 4205.4s (33.4%)
  6. dist-aarch64-linux: 7833.5s -> 5521.0s (-29.5%)
  7. dist-aarch64-apple: 4729.9s -> 5266.7s (11.4%)
  8. dist-apple-various: 7228.1s -> 6438.1s (-10.9%)
  9. i686-msvc-2: 7583.2s -> 6928.3s (-8.6%)
  10. dist-various-2: 3235.4s -> 3464.7s (7.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138395 Download GCC from CI on test builders 7f4bffdf5a6afc7f6f4e2b33d4e75d17ad59491b (link)
#138737 uefi: Update r-efi f00ad7e745f42a7f00ea7ba71b93f7206553f4ae (link)
#138939 Add Arc::is_unique abb427dccbe585e4e502e0cb92f99c047fef584d (link)
#139224 fix(test): Expose '--no-capture' in favor of --nocapture f1eb0fda49c524a05125f472b164023fcb7f7e42 (link)
#139546 std(docs): clarify how std::fs::set_permisions works with s… 9940ba89c863e4a88e8d43fa5935bf23c88644b8 (link)
#140345 Avoid re-interning in LateContext::get_def_path 7d516c4a31cd2b6670bdcbf69daef9a5450226be (link)
#140351 docs: fix incorrect stability markers on `std::{todo, match… ab332f10732cb0a97486f09c5ca9c879f5c3b873 (link)
#140359 specify explicit safety guidance for from_utf8_unchecked 7761007cd70c28778c63d8bcabf892325a9ac111 (link)

previous master: deb947971c

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (21079f5): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.4%, secondary -1.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.1% [4.1%, 4.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-1.6%, -1.3%] 2
Improvements ✅
(secondary)
-1.3% [-1.6%, -1.0%] 9
All ❌✅ (primary) 0.4% [-1.6%, 4.1%] 3

Cycles

Results (primary 0.7%, secondary -2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.7% [0.5%, 0.9%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.2%, -1.7%] 3
All ❌✅ (primary) 0.7% [0.5%, 0.9%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 763.193s -> 762.113s (-0.14%)
Artifact size: 365.16 MiB -> 365.17 MiB (0.00%)

@ChrisDenton ChrisDenton deleted the rollup-3mj0wp9 branch April 28, 2025 11:09
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 merged-by-bors This PR was explicitly merged by bors. 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.