Skip to content

Unused Argument Warnings in Intrinsics Without Body #135598

Open
@vayunbiyani

Description

@vayunbiyani

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)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-intrinsicsArea: IntrinsicsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions