Conversation
Use `splice` to avoid shifting the other items twice. Put `extern crate std;` first so it's already resolved when we resolve `::std::prelude::rust_20XX`.
This patch also prepares the affected code in `coverage_attr_on` for some subsequent changes.
…errors coverage: Treat `#[automatically_derived]` as `#[coverage(off)]` One of the contributing factors behind rust-lang#141577 (comment) was the presence of derive-macro-generated code containing nested closures. Coverage instrumentation already has a heuristic for skipping code marked with `#[automatically_derived]` (rust-lang#120185), because derived code is usually not worth instrumenting, and also has a tendency to trigger vexing edge-case bugs in coverage instrumentation or coverage codegen. However, the existing heuristic only applied to the associated items directly within an auto-derived impl block, and had no effect on closures or nested items within those associated items. This PR therefore extends the search for `#[coverage(..)]` attributes to also treat `#[automatically_derived]` as an implied `#[coverage(off)]` for the purposes of coverage instrumentation. --- This change doesn’t rule out an entire category of bugs, because it only affects code that actually uses the auto-derived attribute. But it should reduce the overall chance of edge-case macro span bugs being observed in the wild.
Simplify `align_of_val::<[T]>(…)` → `align_of::<T>()` I spotted this while working on the inliner (rust-lang#144561). In particular, if [`Layout::for_value`](https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.for_value) inlines, then it can be pretty easy to end up with an `align_of_val::<[T]>` today (demo: <https://rust.godbolt.org/z/Tesnscj4a>) where we can save at least a block, if not more, by using the version that's an rvalue and not a call.
…cote expand: Micro-optimize prelude injection Use `splice` to avoid shifting the other items twice. Put `extern crate std;` first so it's already resolved when we resolve `::std::prelude::rust_20XX`.
…r-cast, r=petrochenkov Account for `.yield` in illegal postfix operator message Fixes rust-lang#144527
Make resolve_fn_signature responsible for its own rib. Small simplification in late resolver rib bookkeeping. r? `@petrochenkov`
Fix typo in `DropGuard` doc Follows-up rust-lang#144236 (I happened to see the typo yesterday but didn’t think it should delay the PR’s merge so I kept quiet, sorryyyyy).
|
@bors r+ rollup=never p=5 |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: 7278554d82 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 7278554 (parent) -> ac0cb05 (this PR) Test differencesShow 34 test diffsStage 1
Stage 2
Additionally, 10 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard ac0cb05326706ef430a975aa85177e8642f2f457 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (ac0cb05): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.4%, secondary 4.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 467.638s -> 468.868s (0.26%) |
|
perf triage: Looks like a spurious change in All these changes are in the backend part of the breakdown graph, so this truly seems like spurious codegen unit shuffling. @rustbot label: +perf-regression-triaged |
Successful merges:
#[automatically_derived]as#[coverage(off)]#144560 (coverage: Treat#[automatically_derived]as#[coverage(off)])align_of_val::<[T]>(…)→align_of::<T>()#144566 (Simplifyalign_of_val::<[T]>(…)→align_of::<T>()).yieldin illegal postfix operator message #144589 (Account for.yieldin illegal postfix operator message)DropGuarddoc #144634 (Fix typo inDropGuarddoc)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup