Skip to content

Rollup of 5 pull requests #140138

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 11 commits into from
Apr 22, 2025
Merged

Rollup of 5 pull requests #140138

merged 11 commits into from
Apr 22, 2025

Conversation

ChrisDenton
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 11 commits April 20, 2025 19:49
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Don't compute name of associated item if it's an RPITIT

Another simple fix for an RPITIT name ICE.

Fixes rust-lang#139941
Fixes rust-lang#140084

r? nnethercote
Construct OutputType using macro and print [=FILENAME] help info

Closes rust-lang#139805

Use define_output_types to define variants of OutputType, as well as refactor all of its methods for clarity. This way no variant is missed when pattern matching or output help messages.

On top of that, I optimized for `emit` help messages.

r? ```@jieyouxu```
Update `libc` to 0.2.172

r? ````@joboet````
…gestion, r=compiler-errors

Improve diagnostics for pointer arithmetic += and -= (fixes rust-lang#137391)

**Description**:

This PR improves the diagnostic message for cases where a binary assignment operation like `ptr += offset` or `ptr -= offset` is attempted on `*mut T`. These operations are not allowed, and the compiler previously suggested calling `.add()` or `.wrapping_add()`, which is misleading if not assigned.

This PR updates the diagnostics to suggest assigning the result of `.wrapping_add()` or `.wrapping_sub()` back to the pointer, e.g.:

**Examples**

For this code
```rust
let mut arr = [0u8; 10];
let mut ptr = arr.as_mut_ptr();

ptr += 2;
```
it will say:
```rust
10 |     ptr += 2;
   |     ---^^^^^
   |     |
   |     cannot use `+=` on type `*mut u8`
   |
help: consider replacing `ptr += offset` with `ptr = ptr.wrapping_add(offset)` or `ptr.add(offset)`
   |
10 -     ptr += 2;
10 +     ptr = ptr.wrapping_add(2);
```

**Related issue**: rust-lang#137391
cc `@nabijaczleweli` for context (issue author)
…notriddle

Use correct annotation for CSS pseudo elements

The list of CSS pseudo elements is pretty short so it was easy to go through. Even though the `:` is accepted, it's incorrect.

For a description of CSS pseudo elements: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements

r? ``@notriddle``
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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-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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Apr 22, 2025
@ChrisDenton
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

📌 Commit ddf0176 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 22, 2025
@bors
Copy link
Collaborator

bors commented Apr 22, 2025

⌛ Testing commit ddf0176 with merge 9bfa31f...

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

☀️ Test successful - checks-actions
Approved by: ChrisDenton
Pushing 9bfa31f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 22, 2025
@bors bors merged commit 9bfa31f into rust-lang:master Apr 22, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 22, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139981 Don't compute name of associated item if it's an RPITIT d1230f02a70bfee73828ac836e35994290ef90b5 (link)
#140077 Construct OutputType using macro and print [=FILENAME] help… 61a23f4ea184e2b19ca0ae1a5d018b790d9a380d (link)
#140081 Update libc to 0.2.172 78a4ebc859dd43ff8a3b763880b77f435d559fe3 (link)
#140094 Improve diagnostics for pointer arithmetic += and -= (fixes… 3c3a79a76c0bc8191cd48a278d32bfa78d1098d4 (link)
#140128 Use correct annotation for CSS pseudo elements 6f14ebcc534e474d8c2758363a02bf35851c3f82 (link)

previous master: fae7785b60

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

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 fae7785 (parent) -> 9bfa31f (this PR)

Test differences

Show 8 test diffs

Stage 1

  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/invalid-compile-flags/emit-output-types-without-args.rs: [missing] -> pass (J1)
  • [ui] tests/ui/typeck/pointer-arith-assign.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs: [missing] -> pass (J0)
  • [ui] tests/ui/invalid-compile-flags/emit-output-types-without-args.rs: [missing] -> pass (J0)
  • [ui] tests/ui/typeck/pointer-arith-assign.rs: [missing] -> pass (J0)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 9bfa31f632912180dc742809bcc51a97f2d7079d --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-1: 11590.5s -> 8291.5s (-28.5%)
  2. x86_64-apple-2: 3889.3s -> 4820.0s (23.9%)
  3. dist-x86_64-apple: 11641.8s -> 8865.3s (-23.8%)
  4. dist-riscv64-linux: 5867.9s -> 5062.4s (-13.7%)
  5. dist-apple-various: 7874.4s -> 8806.0s (11.8%)
  6. x86_64-gnu-llvm-19-1: 5483.7s -> 5220.7s (-4.8%)
  7. x86_64-gnu-llvm-20-2: 5869.5s -> 6113.4s (4.2%)
  8. dist-powerpc64le-linux: 9606.6s -> 9963.1s (3.7%)
  9. dist-i686-msvc: 6672.3s -> 6913.5s (3.6%)
  10. dist-loongarch64-musl: 5129.0s -> 5311.2s (3.6%)
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

Finished benchmarking commit (9bfa31f): 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.5%, secondary -2.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)
0.8% [0.8%, 0.9%] 4
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
-1.0% [-1.6%, -0.5%] 13
Improvements ✅
(secondary)
-2.8% [-3.2%, -2.2%] 5
All ❌✅ (primary) -0.5% [-1.6%, 0.9%] 17

Cycles

Results (primary 0.6%, secondary -1.5%)

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.6% [0.5%, 0.7%] 2
Regressions ❌
(secondary)
5.8% [2.5%, 9.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.4%, -2.5%] 11
All ❌✅ (primary) 0.6% [0.5%, 0.7%] 2

Binary size

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

Bootstrap: 775.257s -> 775.125s (-0.02%)
Artifact size: 365.06 MiB -> 365.14 MiB (0.02%)

@ChrisDenton ChrisDenton deleted the rollup-zw7jibi branch April 22, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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-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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post-#112261 pointer += integer diagnostics suggest replacing with unused value
9 participants