Skip to content
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

Unused Argument Warnings in Intrinsics Without Body #135598

Open
vayunbiyani opened this issue Jan 16, 2025 · 2 comments
Open

Unused Argument Warnings in Intrinsics Without Body #135598

vayunbiyani opened this issue Jan 16, 2025 · 2 comments
Labels
C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@vayunbiyani
Copy link
Contributor

Problem:
The compiler emits warnings about unused arguments in intrinsic functions without bodies (when #[rustc_intrinsic] is used). These arguments are inherently unused, but the warnings create unnecessary noise.

Proposed Solution:
Update the compiler to automatically suppress unused argument warnings for intrinsics without bodies. This eliminates the need for manual workarounds like prefixing variable names with _.

Issue reproduced here:
#135333 (comment)

@vayunbiyani vayunbiyani added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 16, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 16, 2025
@RalfJung
Copy link
Member

Cc @oli-obk

@cyrgani
Copy link
Contributor

cyrgani commented Jan 16, 2025

@rustbot label -I-ICE

@rustbot rustbot removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants