Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

clubby789 and others added 19 commits April 3, 2025 18:10
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
…` tests

These emit prelude imports which means they are always edition dependent
This will allow us to eagerly translate messages on a top-level
diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the
awkward closure passed into Subdiagnostic and make better use of
`Into`.
…oses

It was simply breaking up compiletest's `runtest.rs` and isn't very
useful in git blame.
…t, r=davidtwco,Urgau,traviscross

Stabilize `cfg_boolean_literals`

Closes rust-lang#131204
`@rustbot` labels +T-lang +I-lang-nominated
This will end up conflicting with the test in rust-lang#138293 so whichever doesn't land first will need updating

--

# Stabilization Report

## General design

### What is the RFC for this feature and what changes have occurred to the user-facing design since the RFC was finalized?

[RFC 3695](rust-lang/rfcs#3695), none.

### What behavior are we committing to that has been controversial? Summarize the major arguments pro/con.

None

### Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?

None

## Has a call-for-testing period been conducted? If so, what feedback was received?

Yes; only positive feedback was received.

## Implementation quality

### Summarize the major parts of the implementation and provide links into the code (or to PRs)

Implemented in [rust-lang#131034](rust-lang#131034).

### Summarize existing test coverage of this feature

- [Basic usage, including `#[cfg()]`, `cfg!()` and `#[cfg_attr()]`](https://github.com/rust-lang/rust/blob/6d71251cf9e40326461f90f8ff9a7024706aea87/tests/ui/cfg/true-false.rs)
- [`--cfg=true/false` on the command line being accessible via `r#true/r#false`](https://github.com/rust-lang/rust/blob/6d71251cf9e40326461f90f8ff9a7024706aea87/tests/ui/cfg/raw-true-false.rs)
- [Interaction with the unstable `#[doc(cfg(..))]` feature](https://github.com/rust-lang/rust/tree/6d71251/tests/rustdoc-ui/cfg-boolean-literal.rs)
- [Denying `--check-cfg=cfg(true/false)`](https://github.com/rust-lang/rust/tree/6d71251/tests/ui/check-cfg/invalid-arguments.rs)
- Ensuring `--cfg false` on the command line doesn't change the meaning of `cfg(false)`: `tests/ui/cfg/cmdline-false.rs`
- Ensuring both `cfg(true)` and `cfg(false)` on the same item result in it being disabled: `tests/ui/cfg/both-true-false.rs`

### What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking?

The above mentioned issue; it should not block as it interacts with another unstable feature.

### What FIXMEs are still in the code for that feature and why is it ok to leave them there?

None

### Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization
- `@clubby789` (RFC)
- `@Urgau` (Implementation in rustc)

### Which tools need to be adjusted to support this feature. Has this work been done?

`rustdoc`'s  unstable`#[doc(cfg(..)]` has been updated to respect it. `cargo` has been updated with a forward compatibility lint to enable supporting it in cargo once stabilized.

## Type system and execution rules

### What updates are needed to the reference/specification? (link to PRs when they exist)

A few lines to be added to the reference for configuration predicates, specified in the RFC.
Consistent with treating Ctor Call as Struct in liveness analysis

Fixes rust-lang#139627

When `ExprKind::Call` is a `Ctor`, skips the checking of `expr` and only checks the arguments, thus being consistent with `ExprKind::Struct`.

r? compiler
…ercote,jieyouxu

Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests

These emit prelude imports which means they are always edition dependent and so running them with a different `--edition` will fail.
…=jswrenn

transmutability: Refactor tests for simplicity

r? `@jswrenn`
…ethercote

Move eager translation to a method on Diag

This will allow us to eagerly translate messages on a top-level diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the awkward closure passed into Subdiagnostic and make better use of `Into`.

r? `@nnethercote`
…onur-ozkan

git: ignore `60600a6fa403216bfd66e04f948b1822f6450af7` for blame purposes

60600a6 was simply breaking up compiletest's `runtest.rs` and isn't very useful in git blame.

r? `@onur-ozkan`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 17, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=1

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

📌 Commit 7650fe9 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 Apr 17, 2025
@matthiaskrgr
Copy link
Member Author

@bors p=5

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Testing commit 7650fe9 with merge 883f9f7...

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 883f9f7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 17, 2025
@bors bors merged commit 883f9f7 into rust-lang:master Apr 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 17, 2025
Copy link
Contributor

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 94015d3 (parent) -> 883f9f7 (this PR)

Test differences

Show 33031 test diffs

Stage 1

  • num::bench_i32_from_str_radix_10: [missing] -> pass (J0)
  • num::int_log::u16_log_geometric: [missing] -> pass (J0)
  • slice::rotate_64_usize_5: [missing] -> pass (J0)
  • slice::rotate_usize: [missing] -> pass (J0)
  • slice::swap_with_slice_usize_3000: [missing] -> pass (J0)
  • sort::tests::stable::self_cmp_cell_i32_random: [missing] -> pass (J0)
  • sort::tests::unstable::deterministic_i32_random_d20: [missing] -> pass (J0)
  • sort::tests::unstable::panic_observable_is_less_random_s95: [missing] -> pass (J0)
  • stats::tests::test_binom25: [missing] -> pass (J0)
  • stats::tests::test_sum_f64s: [missing] -> pass (J0)
  • str::trim_ascii_char::short_pile_of_poo: [missing] -> pass (J0)
  • big_math: [missing] -> pass (J1)
  • c_str2::equal_hash: [missing] -> pass (J1)
  • collections::linked_list::tests::test_cursor_mut_insert: [missing] -> pass (J1)
  • f32::test_algebraic: [missing] -> pass (J1)
  • fmt::builders::debug_list::test_empty_non_exhaustive: [missing] -> pass (J1)
  • intrinsics::test_typeid_sized_types: [missing] -> pass (J1)
  • io::tests::read_buf_exact: [missing] -> pass (J1)
  • io::tests::slice_read_exact_eof: [missing] -> pass (J1)
  • iter::adapters::flat_map::test_iterator_flat_map: [missing] -> pass (J1)
  • iter::adapters::map_windows::test_laziness: [missing] -> pass (J1)
  • iter::traits::iterator::test_next_chunk: [missing] -> pass (J1)
  • misc_tests::i64_slice: [missing] -> pass (J1)
  • mpmc::recv_from_outside_runtime: [missing] -> pass (J1)
  • mpsc_sync::oneshot_single_thread_try_send_closed2: [missing] -> pass (J1)
  • mutex::test_get_mut: [missing] -> pass (J1)
  • num::i32::test_arith_operation: [missing] -> pass (J1)
  • num::i32::test_unbounded_shl: [missing] -> pass (J1)
  • num::ops::test_bitxor_defined: [missing] -> pass (J1)
  • num::u32::test_carrying_add: [missing] -> pass (J1)
  • num::u8::test_carrying_mul: [missing] -> pass (J1)
  • ptr::align_offset_zst: [missing] -> pass (J1)
  • ptr::test_set_memory_const: [missing] -> pass (J1)
  • rc::test_dead: [missing] -> pass (J1)
  • slice::slice_index::rangeinclusive_len_len::pass: [missing] -> pass (J1)
  • slice::test_iterator_advance_by: [missing] -> pass (J1)
  • sort::tests::stable::fixed_seed_rand_vec_prefix: [missing] -> pass (J1)
  • sort::tests::unstable::correct_dyn_val_random_z1: [missing] -> pass (J1)
  • sys_common::wtf8::tests::wtf8_to_string_lossy: [missing] -> pass (J1)
  • test_saturating_add_uint: [missing] -> pass (J1)
  • vec::vec_null_ptr_roundtrip: [missing] -> pass (J1)
  • vec_deque::test_param_int: [missing] -> pass (J1)
  • errors::verify_const_eval_unmarked_const_item_exposed_13: [missing] -> pass (J2)
  • errors::verify_passes_doc_expect_str_20: [missing] -> pass (J2)
  • graph::vec_graph::tests::successors: [missing] -> pass (J2)
  • spec::tests::i686_uwp_windows_msvc: [missing] -> pass (J2)
  • tests::test_native_libs_tracking_hash_different_values: [missing] -> pass (J2)
  • sort::tests::unstable::violate_ord_retain_orig_set_i32_descending: [missing] -> ignore (J3)

Stage 2

  • fs::tests::chmod_works: pass -> [missing] (J0)
  • iter::bench_next_chunk_filter_map_predictably_true: pass -> [missing] (J0)
  • iter::bench_rposition: pass -> [missing] (J0)
  • num::bench_i8_from_str_radix_10: pass -> [missing] (J0)
  • process::tests::set_current_dir_works: pass -> [missing] (J0)
  • sort::tests::unstable::panic_retain_orig_set_string_random_d2: pass -> [missing] (J0)
  • sort::tests::unstable::self_cmp_cell_i32_random: pass -> [missing] (J0)
  • str::contains_bang_str::short_ascii: pass -> [missing] (J0)
  • cell::smoketest_unsafe_cell: pass -> [missing] (J1)
  • collections::binary_heap::test_iter_rev_cloned_collect: pass -> [missing] (J1)
  • collections::btree::map::tests::test_basic_small: pass -> [missing] (J1)
  • collections::vec_deque::tests::bench_pop_back_100: pass -> [missing] (J1)
  • empty_lines_mid_message: pass -> [missing] (J1)
  • f32::test_abs: pass -> [missing] (J1)
  • f32::test_sqrt_domain: pass -> [missing] (J1)
  • f64::test_is_sign_positive: pass -> [missing] (J1)
  • f64::test_ln_gamma: pass -> [missing] (J1)
  • io::copy::tests::copy_specializes_bufreader: pass -> [missing] (J1)
  • io::tests::chain_zero_length_read_is_not_eof: pass -> [missing] (J1)
  • io::util::tests::empty_reads: pass -> [missing] (J1)
  • iter::adapters::chain::test_chain: pass -> [missing] (J1)
  • iter::adapters::peekable::test_iterator_peekable_nth: pass -> [missing] (J1)
  • iter::traits::iterator::test_count: pass -> [missing] (J1)
  • mpsc::oneshot_single_thread_send_port_close: pass -> [missing] (J1)
  • mpsc::stress_recv_timeout_two_threads: pass -> [missing] (J1)
  • mpsc_sync::oneshot_multi_thread_close_stress: pass -> [missing] (J1)
  • mpsc_sync::oneshot_single_thread_send_then_recv: pass -> [missing] (J1)
  • mpsc_sync::stress_recv_timeout_two_threads: pass -> [missing] (J1)
  • mutex::test_get_cloned: pass -> [missing] (J1)
  • num::dec2flt::zero: pass -> [missing] (J1)
  • num::i8::test_widening_mul: pass -> [missing] (J1)
  • num::test_try_i64u16: pass -> [missing] (J1)
  • str::test_replacen: pass -> [missing] (J1)
  • sync::test_arc_cyclic_two_refs: pass -> [missing] (J1)
  • sync::test_from_str: pass -> [missing] (J1)
  • thread_local_hygeiene: pass -> [missing] (J1)
  • vec::test_extend_from_within_empty_vec: pass -> [missing] (J1)
  • errors::verify_builtin_macros_concat_bytes_non_u8_37: pass -> [missing] (J2)
  • errors::verify_builtin_macros_concat_bytes_oob_36: pass -> [missing] (J2)
  • fingerprint::tests::combine_commutative_is_order_independent: pass -> [missing] (J2)
  • html::render::sorted_template::tests::round_trip_html: pass -> [missing] (J2)
  • lints::verify_lint_builtin_global_asm_22: pass -> [missing] (J2)
  • lints::verify_lint_enum_intrinsics_mem_variant_41: pass -> [missing] (J2)
  • lints::verify_lint_invalid_asm_label_format_arg_102: pass -> [missing] (J2)
  • lints::verify_lint_macro_rule_never_used_111: pass -> [missing] (J2)
  • obligation_forest::tests::push_pop: pass -> [missing] (J2)
  • parser::tests::ttdelim_span: pass -> [missing] (J2)
  • session_diagnostics::verify_driver_impl_unstable_feature_usage_16: pass -> [missing] (J2)
  • spec::tests::arm64e_apple_tvos: pass -> [missing] (J2)
  • tests::test_typed_arena_drop_small_count: pass -> [missing] (J2)
  • sort::tests::stable::observable_is_less_saw_mixed: ignore -> [missing] (J3)
  • f16::test_atanh: pass -> [missing] (J4)

(and 16426 additional test diffs)

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

Job group index

Job duration changes

  1. x86_64-apple-2: 1338.0s -> 8238.1s (515.7%)
  2. test-various: 2196.8s -> 4162.8s (89.5%)
  3. x86_64-gnu-aux: 4176.2s -> 6055.1s (45.0%)
  4. aarch64-apple: 2962.1s -> 3745.6s (26.5%)
  5. x86_64-apple-1: 6502.5s -> 7482.2s (15.1%)
  6. dist-x86_64-apple: 10693.8s -> 9303.4s (-13.0%)
  7. dist-x86_64-freebsd: 4668.4s -> 5099.8s (9.2%)
  8. dist-aarch64-apple: 4735.5s -> 4368.7s (-7.7%)
  9. dist-x86_64-msvc: 6147.9s -> 5704.9s (-7.2%)
  10. x86_64-gnu-debug: 6106.2s -> 6516.4s (6.7%)
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
#138632 Stabilize cfg_boolean_literals 355d92cad77755205d23776142919953e5a7d2a5 (link)
#139416 unstable book; document macro_metavar_expr_concat f2fece6ae945591695e0628fe087ce3c59e517be (link)
#139782 Consistent with treating Ctor Call as Struct in liveness an… a651971ec78e8ef6065bb65c0de9443c2fff0607 (link)
#139885 document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, an… 9a61182d3b8657313b7364e58246a93ad5d6b27c (link)
#139904 Explicitly annotate edition for unpretty=expanded and `un… 1f11e54184df7558c9deb34dfe26841a0d66467f (link)
#139932 transmutability: Refactor tests for simplicity 294bd12354cb6c002a278378802fb9c2ba72830d (link)
#139944 Move eager translation to a method on Diag a58be95fdbe5072185968f79d76b94b01dd7f08f (link)
#139948 git: ignore 60600a6fa403216bfd66e04f948b1822f6450af7 for … a4ca0c2cfb027a3dd4b16025236351e260865e37 (link)

previous master: 94015d3cd4

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 (883f9f7): 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.1%)

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)
1.2% [0.5%, 2.9%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.2% [-2.7%, -0.4%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-2.7%, 2.9%] 9

Cycles

Results (primary -0.2%, secondary 4.6%)

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.4% [0.4%, 0.4%] 2
Regressions ❌
(secondary)
4.6% [4.6%, 4.6%] 1
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.6%, 0.4%] 6

Binary size

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

Bootstrap: 775.495s -> 775.5s (0.00%)
Artifact size: 365.05 MiB -> 365.03 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-compiler Relevant to the compiler 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.