Skip to content

cg_llvm: Make the LLVM version-check bindings safe - #162710

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:version-safe
Sep 13, 2026
Merged

cg_llvm: Make the LLVM version-check bindings safe#162710
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Zalathar:version-safe

Conversation

@Zalathar

Copy link
Copy Markdown
Member

These version-check functions should always be safe to call, so marking them safe avoids some unsafe blocks at call sites.

There should be no change to compiler behaviour.

@rustbot

rustbot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs

cc @ZuseZ4

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 13, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 13, 2026
@rustbot

rustbot commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 76 candidates
  • Random selection from 18 candidates

@chenyukang

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 75d7c93 has been approved by chenyukang

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 Sep 13, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 13, 2026
cg_llvm: Make the LLVM version-check bindings safe

- Follow-up to rust-lang#161788
---

These version-check functions should always be safe to call, so marking them `safe` avoids some unsafe blocks at call sites.

There should be no change to compiler behaviour.
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 13, 2026
cg_llvm: Make the LLVM version-check bindings safe

- Follow-up to rust-lang#161788
---

These version-check functions should always be safe to call, so marking them `safe` avoids some unsafe blocks at call sites.

There should be no change to compiler behaviour.
rust-bors Bot pushed a commit that referenced this pull request Sep 13, 2026
Rollup of 5 pull requests

Successful merges:

 - #161178 (lint ineffective #[unstable] annotations on re-exports)
 - #162642 (Add regression test for matching associated types on new solver)
 - #162665 (Add a UI regression test.)
 - #162710 (cg_llvm: Make the LLVM version-check bindings safe)
 - #162722 (Fix typo in riscv64a23-unknown-linux-gnu platform docs)
rust-bors Bot pushed a commit that referenced this pull request Sep 13, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #162642 (Add regression test for matching associated types on new solver)
 - #162665 (Add a UI regression test.)
 - #162710 (cg_llvm: Make the LLVM version-check bindings safe)
 - #162722 (Fix typo in riscv64a23-unknown-linux-gnu platform docs)
@rust-bors
rust-bors Bot merged commit 348c0ba into rust-lang:main Sep 13, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 13, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 13, 2026
Rollup merge of #162710 - Zalathar:version-safe, r=chenyukang

cg_llvm: Make the LLVM version-check bindings safe

- Follow-up to #161788
---

These version-check functions should always be safe to call, so marking them `safe` avoids some unsafe blocks at call sites.

There should be no change to compiler behaviour.
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. F-autodiff `#![feature(autodiff)]` 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