1
Fork 0

Rollup merge of #124324 - nnethercote:minor-ast-cleanups, r=estebank

Minor AST cleanups

r? ``@estebank``
This commit is contained in:
Matthias Krüger 2024-04-25 06:31:04 +02:00 committed by GitHub
commit fc6070cd8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 79 additions and 90 deletions

View file

@ -435,7 +435,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
sym::repr => {
codegen_fn_attrs.alignment = if let Some(items) = attr.meta_item_list()
&& let [item] = items.as_slice()
&& let Some((sym::align, literal)) = item.name_value_literal()
&& let Some((sym::align, literal)) = item.singleton_lit_list()
{
rustc_attr::parse_alignment(&literal.kind)
.map_err(|msg| {