Skip to content

Refactor libproc_macro: remove * imports#157793

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

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

@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

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants