Closed
Description
Code
const N: usize = 8;
#[repr(align(N))]
struct T;
Current output
error[E0693]: incorrect `repr(align)` attribute format: `align` takes exactly one argument in parentheses
--> src/main.rs:2:8
|
2 | #[repr(align(N))]
| ^^^^^^^^
Desired output
error[E????]: incorrect `repr(align)` value: alignment must be a literal integer
--> src/main.rs:2:14
|
2 | #[repr(align(N))]
| ^
Rationale and extra context
#[repr(align(N))]
does give align
exactly one argument in parentheses, but the error implies that it doesn't.
Other cases
No response
Rust Version
rustc 1.78.0-nightly (b381d3ab2 2024-02-12)
binary: rustc
commit-hash: b381d3ab27f788f990551100c4425bb782d26d76
commit-date: 2024-02-12
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Area: Attributes (`#[…]`, `#![…]`)Area: Messages for errors, warnings, and lintsDiagnostics: Confusing error or lint that should be reworked.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.Relevant to the compiler team, which will review and decide on the PR/issue.