Skip to content

Make function signatures a separate type in rustc_codegen_llvm - #166693

Open
beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:typed-llvm-fn-sig
Open

beetrees wants to merge 1 commit into
rust-lang:mainfrom
beetrees:typed-llvm-fn-sig

Conversation

@beetrees

Copy link
Copy Markdown
Contributor

Function signatures are already a separate type in rustc_codegen_ssa, but before this PR were just an alias for Type<'ll> in rustc_codegen_llvm. Function signatures should almost never be mixed with other types, so having them as a separate type makes it harder to mix them up and removes the need for an assertion.

r? @folkertdev

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 28, 2026
@rustbot

rustbot commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

folkertdev is currently at their maximum review capacity.
They may take a while to respond.

@folkertdev folkertdev left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6ef36b5 has been approved by folkertdev

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 Nov 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 28, 2026
…ertdev

Make function signatures a separate type in `rustc_codegen_llvm`

Function signatures are already a separate type in `rustc_codegen_ssa`, but before this PR were just an alias for `Type<'ll>` in `rustc_codegen_llvm`. Function signatures should almost never be mixed with other types, so having them as a separate type makes it harder to mix them up and removes the need for an assertion.

r? @folkertdev
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 28, 2026
…ertdev

Make function signatures a separate type in `rustc_codegen_llvm`

Function signatures are already a separate type in `rustc_codegen_ssa`, but before this PR were just an alias for `Type<'ll>` in `rustc_codegen_llvm`. Function signatures should almost never be mixed with other types, so having them as a separate type makes it harder to mix them up and removes the need for an assertion.

r? @folkertdev
rust-bors Bot pushed a commit that referenced this pull request Nov 28, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #166232 (Fix considering `[u8; 0]` to have trivial ABI in layout)
 - #166663 (optimize `ArrayWindows::nth`)
 - #166693 (Make function signatures a separate type in `rustc_codegen_llvm`)
 - #166699 (rustc_serialize: Remove unnecessary lifetime from `FileEncoder`)
 - #166665 (Mention alignment in handle_alloc_error)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 28, 2026
…ertdev

Make function signatures a separate type in `rustc_codegen_llvm`

Function signatures are already a separate type in `rustc_codegen_ssa`, but before this PR were just an alias for `Type<'ll>` in `rustc_codegen_llvm`. Function signatures should almost never be mixed with other types, so having them as a separate type makes it harder to mix them up and removes the need for an assertion.

r? @folkertdev
rust-bors Bot pushed a commit that referenced this pull request Nov 28, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #166232 (Fix considering `[u8; 0]` to have trivial ABI in layout)
 - #166663 (optimize `ArrayWindows::nth`)
 - #166693 (Make function signatures a separate type in `rustc_codegen_llvm`)
 - #166699 (rustc_serialize: Remove unnecessary lifetime from `FileEncoder`)
 - #166366 (Add tests to check we don't confuse LLVM and builtin intrinsics.)
rust-bors Bot pushed a commit that referenced this pull request Nov 28, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #166232 (Fix considering `[u8; 0]` to have trivial ABI in layout)
 - #166663 (optimize `ArrayWindows::nth`)
 - #166693 (Make function signatures a separate type in `rustc_codegen_llvm`)
 - #166699 (rustc_serialize: Remove unnecessary lifetime from `FileEncoder`)
 - #166366 (Add tests to check we don't confuse LLVM and builtin intrinsics.)

This branch has not been deployed

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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