Skip to content

compiler: redescribe llvmlike_vector_align as rust_vector_align#159154

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
workingjubilee:rename-llvmlike-vector-align
Jul 12, 2026
Merged

compiler: redescribe llvmlike_vector_align as rust_vector_align#159154
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
workingjubilee:rename-llvmlike-vector-align

Conversation

@workingjubilee

@workingjubilee workingjubilee commented Jul 11, 2026

Copy link
Copy Markdown
Member

This is mostly a cosmetic change. The current form of this function tends to mislead people to assume it is implicitly "correct" in various ways by invoking LLVM as an authority.

It is only sort-of correct. More specifically, LLVM mostly doesn't care, and neither do we, except when it comes to FFI.

So, we have an arbitrary algorithm that works usefully in most cases. It is not inherently more correct than other arbitrary algorithms, so spell this out and weaken its contract.

r? @scottmcm

I have various mostly-written PRs I was considering stuffing this commit in, including one that actually changes the algorithm as this suggests, but I figured I'd make this change first so that I stop having psychic lock contention.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 11, 2026
@scottmcm

Copy link
Copy Markdown
Member

Sounds good. I would have no idea how to judge whether something "resembl[ed] the one LLVM would pick", so this description seems more useful.

r=me when CI is happy
@bors rollup=always

This is mostly a cosmetic change. The current form of this function tends
to mislead people to assume it is implicitly "correct" in various ways by
invoking LLVM as an authority.

It is only sort-of correct. More specifically, LLVM mostly doesn't care,
and neither do we, except when it comes to FFI.

So, we have an arbitrary algorithm that works usefully in most cases.
It is not inherently more correct than other arbitrary algorithms, so
spell this out and weaken its contract.
@workingjubilee workingjubilee force-pushed the rename-llvmlike-vector-align branch from 7288c1a to b10a1e3 Compare July 11, 2026 23:29
@workingjubilee workingjubilee changed the title compiler: redescribe llvmlike_vector_align as rustc_vector_align compiler: redescribe llvmlike_vector_align as rust_vector_align Jul 11, 2026
@workingjubilee

Copy link
Copy Markdown
Member Author

@bors r+

@rust-bors

rust-bors Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b10a1e3 has been approved by workingjubilee

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 12, 2026
@scottmcm

Copy link
Copy Markdown
Member

@bors r-
(you forgot r=scottmcm)

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 12, 2026
@rust-bors

rust-bors Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 12, 2026
@scottmcm

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b10a1e3 has been approved by scottmcm

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 12, 2026
@workingjubilee

Copy link
Copy Markdown
Member Author

( doh )

rust-bors Bot pushed a commit that referenced this pull request Jul 12, 2026
Rollup of 3 pull requests

Successful merges:

 - #159125 (`mut` restriction lowering)
 - #159154 (compiler: redescribe llvmlike_vector_align as rust_vector_align)
 - #159157 (Better comment the struct used by `{read,write}_unaligned`)

Failed merges:

 - #158732 (Apply MCP 1003 and move diagnostics.rs into its own module)
@rust-bors rust-bors Bot merged commit e48f624 into rust-lang:main Jul 12, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 12, 2026
rust-timer added a commit that referenced this pull request Jul 12, 2026
Rollup merge of #159154 - workingjubilee:rename-llvmlike-vector-align, r=scottmcm

compiler: redescribe llvmlike_vector_align as rust_vector_align

This is mostly a cosmetic change. The current form of this function tends to mislead people to assume it is implicitly "correct" in various ways by invoking LLVM as an authority.

It is only sort-of correct. More specifically, LLVM mostly doesn't care, and neither do we, except when it comes to FFI.

So, we have an arbitrary algorithm that works usefully in most cases. It is not inherently more correct than other arbitrary algorithms, so spell this out and weaken its contract.
@workingjubilee workingjubilee deleted the rename-llvmlike-vector-align branch July 13, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants