rust/compiler/rustc_builtin_macros
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
..
src Avoid unnecessary MetaItem/Attribute conversions. 2022-11-29 12:08:57 +11:00
Cargo.toml rustdoc: use ThinVec for cleaned generics 2022-11-02 16:17:22 -07:00