Skip to content

Warn when #[export_name] is used with generic functions #140742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bjorn3 opened this issue May 7, 2025 · 1 comment · Fixed by #140851
Closed

Warn when #[export_name] is used with generic functions #140742

bjorn3 opened this issue May 7, 2025 · 1 comment · Fixed by #140851
Assignees
Labels
A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented May 7, 2025

We already warn when using #[no_mangle] with generic functions as it is bound to lead to symbol conflicts.

cc https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Generic.20functions.20with.20.23.5Bunsafe.28export_name.20.3D.20.22.2E.2E.2E.22.29.5D/near/516534422

@bjorn3 bjorn3 added A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one. labels May 7, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 7, 2025
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 7, 2025
@mu001999
Copy link
Contributor

mu001999 commented May 9, 2025

@rustbot claim

@bors bors closed this as completed in 5f55d0d May 11, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 11, 2025
Rollup merge of rust-lang#140851 - mu001999-contrib:new-lint, r=bjorn3

Warn when `#[export_name]` is used with generic functions

Fixes rust-lang#140742
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants