Skip to content

simplify some proc_macro things#157271

Open
cyrgani wants to merge 5 commits into
rust-lang:mainfrom
cyrgani:pm-cleaning
Open

simplify some proc_macro things#157271
cyrgani wants to merge 5 commits into
rust-lang:mainfrom
cyrgani:pm-cleaning

Conversation

@cyrgani

@cyrgani cyrgani commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

View all comments

Each commit should be reviewable on its own. Locally, this also resulted in some slightly better perf results.

@rustbot

rustbot commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot rustbot added 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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Jun 1, 2026
@rustbot

rustbot commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @petrochenkov

@Kobzol

Kobzol commented Jun 1, 2026

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 1, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 1, 2026
simplify some `proc_macro` things
@rust-bors

rust-bors Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: aba743d (aba743d72e1a2d02bf787988ac919c3c416f243c, parent: c0bb140a37c81cf59a0b40c21c9413059644e294)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (aba743d): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.1%, 1.1%] 27
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.8% [-1.9%, -0.2%] 13
Improvements ✅
(secondary)
-1.9% [-4.2%, -0.1%] 13
All ❌✅ (primary) -0.0% [-1.9%, 1.1%] 40

Max RSS (memory usage)

Results (primary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Cycles

Results (primary 0.4%, secondary -5.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.9% [1.7%, 2.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-5.6% [-5.6%, -5.6%] 1
All ❌✅ (primary) 0.4% [-2.7%, 2.1%] 3

Binary size

Results (primary -0.9%, secondary -2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.9% [-1.3%, -0.4%] 17
Improvements ✅
(secondary)
-2.1% [-3.0%, -0.4%] 7
All ❌✅ (primary) -0.9% [-1.3%, -0.4%] 17

Bootstrap: 511.375s -> 517.888s (1.27%)
Artifact size: 400.63 MiB -> 400.68 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 1, 2026
Comment thread compiler/rustc_expand/src/proc_macro_server.rs
Comment thread library/proc_macro/src/bridge/buffer.rs
Comment thread library/proc_macro/src/bridge/buffer.rs
@petrochenkov petrochenkov 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 Jun 2, 2026
@rust-bors

This comment has been minimized.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 5, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang#157271 (though it was not a part of it). This looked pretty promising locally.
rust-timer added a commit that referenced this pull request Jun 5, 2026
Rollup merge of #157450 - cyrgani:pm-inline, r=petrochenkov

mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to #157271 (though it was not a part of it). This looked pretty promising locally.
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Jun 8, 2026
mark `Encode`, `Decode`, `Mark` impls as `#[inline]`

Related to rust-lang/rust#157271 (though it was not a part of it). This looked pretty promising locally.
@rust-bors

This comment has been minimized.

@cyrgani cyrgani added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 22, 2026
@cyrgani

cyrgani commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

this should be perf-neutral now since all relevant commits either got dropped or moved into their own PRs

@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+ rollup=maybe

@rust-bors

rust-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 30004a8 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 23, 2026
@petrochenkov petrochenkov removed the perf-regression Performance regression. label Jun 23, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 23, 2026
simplify some `proc_macro` things

Each commit should be reviewable on its own. Locally, this also resulted in some slightly better perf results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants