Skip to content

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Apr 24, 2025

All uses have been removed. And it's nonsensical: an identifier by definition has at least one char.

r? @oli-obk

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. labels Apr 24, 2025
@nnethercote
Copy link
Contributor Author

Helps with #137978.

@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

fmease is on vacation.

Please choose another assignee.

@nnethercote nnethercote marked this pull request as ready for review April 25, 2025 05:26
@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@nnethercote
Copy link
Contributor Author

Oh, the first commit here is from #140095 and doesn't need to be reviewed; this PR shouldn't be merged until that one has been.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 28, 2025

r=me when the other PR landed

@bors reviewed

@oli-obk oli-obk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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

☔ The latest upstream changes (presumably #140388) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Collaborator

bors commented May 9, 2025

☔ The latest upstream changes (presumably #140818) made this pull request unmergeable. Please resolve the merge conflicts.

All uses have been removed. And it's nonsensical: an identifier by
definition has at least one char.

The commits adds an is-non-empty assertion to `Ident::new` to enforce
this, and converts some `Ident` constructions to use `Ident::new`.
Adding the assertion requires making `Ident::new` and
`Ident::with_dummy_span` non-const, which is no great loss.

The commit amends a couple of places that do path splitting to ensure no
empty identifiers are created.
@nnethercote
Copy link
Contributor Author

#140095 has been merged and I have updated.

@bors r=oli-obk

@bors
Copy link
Collaborator

bors commented May 9, 2025

📌 Commit 0984db5 has been approved by oli-obk

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 9, 2025
@bors
Copy link
Collaborator

bors commented May 9, 2025

⌛ Testing commit 0984db5 with merge a7b1b24...

@bors
Copy link
Collaborator

bors commented May 9, 2025

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing a7b1b24 to master...

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

github-actions bot commented May 9, 2025

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 c8b7f32 (parent) -> a7b1b24 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard a7b1b24587dcbebf12455c41ed828d9b486487be --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. dist-apple-various: 8598.3s -> 6205.5s (-27.8%)
  2. x86_64-apple-2: 7352.0s -> 5902.6s (-19.7%)
  3. dist-x86_64-apple: 9239.2s -> 7714.9s (-16.5%)
  4. dist-arm-linux: 4512.7s -> 5004.9s (10.9%)
  5. dist-loongarch64-linux: 6603.6s -> 6049.9s (-8.4%)
  6. dist-x86_64-mingw: 7519.9s -> 7920.4s (5.3%)
  7. dist-x86_64-netbsd: 5169.5s -> 4948.5s (-4.3%)
  8. dist-i686-msvc: 6811.7s -> 7091.8s (4.1%)
  9. dist-i686-mingw: 7664.6s -> 7974.8s (4.0%)
  10. dist-aarch64-apple: 5540.7s -> 5319.2s (-4.0%)
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 (a7b1b24): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.3% [0.1%, 1.1%] 115
Regressions ❌
(secondary)
0.4% [0.2%, 0.7%] 41
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.1%, 1.1%] 115

Max RSS (memory usage)

Results (primary 0.5%, secondary -2.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)
1.4% [0.4%, 5.1%] 9
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
-1.6% [-3.0%, -0.4%] 4
Improvements ✅
(secondary)
-4.6% [-5.2%, -4.0%] 2
All ❌✅ (primary) 0.5% [-3.0%, 5.1%] 13

Cycles

Results (primary 0.5%, secondary 2.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.6% [0.4%, 0.9%] 13
Regressions ❌
(secondary)
2.6% [2.4%, 2.7%] 2
Improvements ✅
(primary)
-0.5% [-0.5%, -0.4%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-0.5%, 0.9%] 15

Binary size

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

Bootstrap: 771.811s -> 772.392s (0.08%)
Artifact size: 365.31 MiB -> 365.74 MiB (0.12%)

@rustbot rustbot added the perf-regression Performance regression. label May 9, 2025
@nnethercote
Copy link
Contributor Author

Ugh, perf regressions were not expected. I'll take a look, though I might not get to it until after RustWeek.

@nnethercote nnethercote deleted the rm-Ident-empty branch May 9, 2025 23:17
nnethercote added a commit to nnethercote/rust that referenced this pull request May 9, 2025
This fixes a perf regression introduced in rust-lang#140252.
@nnethercote
Copy link
Contributor Author

#140880 should fix the perf regressions.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
…r=<try>

Make the assertion in `Ident::new` debug-only.

This fixes a perf regression introduced in rust-lang#140252.

r? `@oli-obk`
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
…r=oli-obk

Make the assertion in `Ident::new` debug-only.

This fixes a perf regression introduced in rust-lang#140252.

r? `@oli-obk`
@nnethercote
Copy link
Contributor Author

#140880 has merged.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label May 10, 2025
nnethercote added a commit to nnethercote/rust that referenced this pull request May 22, 2025
It was added in rust-lang#140052, but the subsequent changes in rust-lang#140252 means it
is no longer necessary. (Indeed, `Ident`s cannot be empty any more.)
cuviper pushed a commit to cuviper/rust that referenced this pull request Jun 20, 2025
This fixes a perf regression introduced in rust-lang#140252.

(cherry picked from commit 4cb9f03)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

5 participants