1
Fork 0

Fix misleading message when using a named constant as a struct alignment/pack

This commit is contained in:
yukang 2024-03-02 22:42:13 +08:00
parent e612d079a1
commit 5a5c6dfb33
8 changed files with 126 additions and 22 deletions

View file

@ -441,7 +441,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
.map_err(|msg| {
struct_span_code_err!(
tcx.dcx(),
attr.span,
literal.span,
E0589,
"invalid `repr(align)` attribute: {}",
msg