Skip to content

Rename MetaSized trait to SizeOfVal#154374

Draft
lqd wants to merge 7 commits intorust-lang:mainfrom
lqd:rename-metasized
Draft

Rename MetaSized trait to SizeOfVal#154374
lqd wants to merge 7 commits intorust-lang:mainfrom
lqd:rename-metasized

Conversation

@lqd
Copy link
Member

@lqd lqd commented Mar 25, 2026

This renames the MetaSized trait from the Sized Hierarchy to SizeOfVal, as the consensus on t-lang from last week's meeting.

I've tried to split the full change into self-contained commits for easier review.

rust/clippy/rustdoc tests all seem to pass locally, but I haven't tried the full cartesian product of all our bootstrap settings and optional submodules, so I'm opening this as draft to first see what breaks on CI.

Of note:

  • r-a uses lang items and rustc crates, but from crates.io, so the r-a tests should not break from this PR per se, but would whenever the autopublished crates are used there. I will eventually open a PR there to handle the renaming as well.
  • cargo also uses lang items in its tests, so it'll be interesting to see whether they fail in this PR, or would once cargo updates to the next nightly containing this PR after it lands. Either way, I will also open a PR there to handle the renaming.
  • I don't know if we need some cfg bootstrap choreography to land this, I thought so things seem to build locally. The dev guide mentions how to run std tests on stage 0, but that command doesn't work anymore. We'll see what PR CI says about needing to do the renaming in multiple steps.

cc @davidtwco as well

lqd added 7 commits March 25, 2026 15:50
t-lang consensus is to name the `MetaSized` trait as `SizeOfVal`: this updates
the lang-item external name as its own independent change for easier reviewing.
That includes:
- the libcore trait, and `library` uses of the lang item
- top-level tests using the lang item in no_core or mini_core tests
- tests in codegen backends, clippy, and rustdoc
The last bits of the renaming:

- rustfmted the one compiler expression that needed reflowing
- blessed test expectations
- updated and renamed the tests whose name referenced "metasized"
- updated the one mention in the rustc-dev-guide
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 25, 2026
@lqd
Copy link
Member Author

lqd commented Mar 25, 2026

I guess it's fine for PR CI.

@bors try jobs=dist-x86_64-linux

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 25, 2026

⌛ Trying commit 13cbf33 with merge 2ea60dd

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/23559064096

rust-bors bot pushed a commit that referenced this pull request Mar 25, 2026
Rename `MetaSized` trait to `SizeOfVal`


try-job: dist-x86_64-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants