Skip to content

refactor: ignore borrow annotations at export/extern tricks#12930

Merged
hargoniX merged 1 commit intomasterfrom
hbv/ignore_export_extern
Mar 16, 2026
Merged

refactor: ignore borrow annotations at export/extern tricks#12930
hargoniX merged 1 commit intomasterfrom
hbv/ignore_export_extern

Conversation

@hargoniX
Copy link
Copy Markdown
Contributor

This PR places set_option compiler.ignoreBorrowAnnotation true in on to all export/extern
pairs. This is necessary because export forces all arguments to be passed as owned while extern
respects borrow annotations. The current approach to the export/extern trick was always broken
but never surfaced. However, with upcoming changes many export/extern pairs are going to be
affected by borrow annotations and would've broken without this.

@hargoniX hargoniX enabled auto-merge March 16, 2026 09:58
@hargoniX hargoniX added the changelog-compiler Compiler, runtime, and FFI label Mar 16, 2026
@hargoniX hargoniX added this pull request to the merge queue Mar 16, 2026
Merged via the queue into master with commit 2d999d7 Mar 16, 2026
21 checks passed
@hargoniX hargoniX deleted the hbv/ignore_export_extern branch March 16, 2026 10:39
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Mar 16, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2026-03-16 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-16 10:50:16)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-03-16 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-03-16 10:50:18)

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

Labels

changelog-compiler Compiler, runtime, and FFI toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants