rust/compiler/rustc_parse/src
Nicholas Nethercote c9ae38c71e Avoid unnecessary MetaItem/Attribute conversions.
`check_builtin_attribute` calls `parse_meta` to convert an `Attribute`
to a `MetaItem`, which it then checks. However, many callers of
`check_builtin_attribute` start with a `MetaItem`, and then convert it
to an `Attribute` by calling `cx.attribute(meta_item)`. This `MetaItem`
to `Attribute` to `MetaItem` conversion is silly.

This commit adds a new function `check_builtin_meta_item`, which can be
called instead from these call sites. `check_builtin_attribute` also now
calls it. The commit also renames `check_meta` as `check_attr` to better
match its arguments.
2022-11-29 12:08:57 +11:00
..
lexer Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
parser Rename NestedMetaItem::[Ll]iteral as NestedMetaItem::[Ll]it. 2022-11-28 15:18:53 +11:00
errors.rs Match crate and slug names 2022-11-21 15:24:50 +01:00
lib.rs Split MacArgs in two. 2022-11-22 09:04:15 +11:00
validate_attr.rs Avoid unnecessary MetaItem/Attribute conversions. 2022-11-29 12:08:57 +11:00