1
Fork 0

Add code comments and documentation

This commit is contained in:
Guillaume Gomez 2022-09-13 15:29:25 +02:00 committed by Rémy Rakic
parent 72d6fde130
commit ae5108a1ed
2 changed files with 16 additions and 0 deletions

View file

@ -837,6 +837,8 @@ pub fn is_builtin_attr_name(name: Symbol) -> bool {
BUILTIN_ATTRIBUTE_MAP.get(&name).is_some()
}
/// Whether this builtin attribute is only used in the local crate.
/// If so, it is not encoded in the crate metadata.
pub fn is_builtin_only_local(name: Symbol) -> bool {
BUILTIN_ATTRIBUTE_MAP.get(&name).map_or(false, |attr| attr.only_local)
}