Skip to content

Conversation

@Keith-Cancel
Copy link

The field entire is redundant. This saves 4 bytes and makes the proc_macro::DelimSpan match up with what the compiler uses. Moreover Group::set_span() overwrites all the fields anyways so they it's not like there is any chance for entire not to be derived from the open and close. Lastly, the way the compiler constructs the entire field is also be based off the open and close.

This takes the size from 20 bytes to 16 bytes which is also a nice power of 2.

The field `entire` is redundant. This saves 4 bytes and makes the DelimSpan match up with what the compiler uses.
@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. labels Nov 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2025

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

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2025

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 the T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. label Nov 23, 2025
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] indexmap test:false 0.566
    Checking postcard v1.1.3
[RUSTC-TIMING] postcard test:false 0.266
[RUSTC-TIMING] syn test:false 2.942
error[E0063]: missing field `entire` in initializer of `proc_macro::bridge::DelimSpan<_>`
   --> src/tools/rust-analyzer/crates/proc-macro-srv/src/server_impl/token_stream.rs:104:31
    |
104 |                         span: bridge::DelimSpan {
    |                               ^^^^^^^^^^^^^^^^^ missing `entire`

@Keith-Cancel
Copy link
Author

Keith-Cancel commented Nov 23, 2025

Okay, it looks like for whatever reason pr-check-1 expects entire not to be there, but pr-check-2 expects entire to be there. They must not be using the same source??

-_-

locally I am able to execute ./x test without any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants