Skip to content

Refactor libproc_macro: remove * imports#157793

Open
Mark-Simulacrum wants to merge 2 commits into
rust-lang:mainfrom
Mark-Simulacrum:proc-macro-refactor
Open

Refactor libproc_macro: remove * imports#157793
Mark-Simulacrum wants to merge 2 commits into
rust-lang:mainfrom
Mark-Simulacrum:proc-macro-refactor

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

This factors out (and goes a bit further) some of the work from #157590 which I think can/should be merged independently of the wasm proc macros strategy, since it just makes it easier to read code in the bridge. It was confusing to get warnings/errors when commenting code that looked unused but was actually pulled in due to the * imports from other modules.

This also factors the panic message into a separate module since it's not really related to rpc in a direct sense.

Best reviewed by-commit.

r? bjorn3 since you've probably at least glanced at this code recently, but happy to re-roll if you'd prefer.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 12, 2026
use std::num::NonZero;

use super::*;
use crate::bridge::{Buffer, Decode, Encode, Mark, arena, client, fxhash, server};

@lqd lqd Jun 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reminds me we could update the vendored fxhash source with a more recent version

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be able to take a crate dependency these days (maybe with some tweaks to the source of rustc-hash), but yeah, we should do that.

@lqd lqd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite sensible to me if you don't need bjorn's r+ per se. Did you intend to add more since this is still a draft?

View changes since this review

@bjorn3 bjorn3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

View changes since this review

@Mark-Simulacrum Mark-Simulacrum marked this pull request as ready for review June 13, 2026 00:45
@rustbot rustbot 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 13, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Just put in draft while waiting for CI to pass, but I think future work can land in separate PRs.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants