Skip to content

[type layout] usize and isize have the same size and alignment#2200

Open
joshlf wants to merge 1 commit intorust-lang:masterfrom
joshlf:patch-8
Open

[type layout] usize and isize have the same size and alignment#2200
joshlf wants to merge 1 commit intorust-lang:masterfrom
joshlf:patch-8

Conversation

@joshlf
Copy link
Contributor

@joshlf joshlf commented Mar 4, 2026

Everybody assumes this to be true, and I assume it was intended to be guaranteed to be true.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Mar 4, 2026
@joshlf
Copy link
Contributor Author

joshlf commented Mar 4, 2026

r? @RalfJung

@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2026

Failed to set assignee to RalfJung: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@joshlf
Copy link
Contributor Author

joshlf commented Mar 4, 2026

r? @ehuss

@traviscross traviscross added I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. labels Mar 10, 2026
@traviscross
Copy link
Contributor

Makes sense. It is a new language guarantee, though, so...

@rfcbot fcp merge lang

@traviscross traviscross added T-lang Relevant to the language team. I-lang-easy-decision The decision needed by lang is conjectured to be easy; this dose not imply nomination. and removed I-lang-easy-decision The decision needed by lang is conjectured to be easy; this dose not imply nomination. labels Mar 10, 2026
@traviscross

This comment was marked as duplicate.

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Mar 10, 2026

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@scottmcm
Copy link
Member

Is there an equivalent statement about alignment that iN and uN have the same alignment in the reference?

@joshlf
Copy link
Contributor Author

joshlf commented Mar 10, 2026

Is there an equivalent statement about alignment that iN and uN have the same alignment in the reference?

No. I'd be happy to relax this to just saying that sizes are equal, which is really what I (personally) care about.

@scottmcm
Copy link
Member

TBH I think that both are obvious things to provide. Was just seeing that we have the size equality guarantees for uN & iN (via the table specifying their exact sizes) so this is blatantly obvious for size. Was just thinking that if the alignment equality was worth guaranteeing for usize & isize then it's probably worth doing for the others too.

(I have no strong feelings about the best way to do that. If you wanted to just just make this be size that's fine; if you wanted to just open another PR to also give the alignment guarantee for the specific-sized integer types that'd also be fine.)

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

Labels

disposition-merge I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. proposed-final-comment-period S-waiting-on-review Status: The marked PR is awaiting review from a maintainer T-lang Relevant to the language team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants