Move is_complete to the module that uses it.

And make it non-`pub`.
This commit is contained in:
Nicholas Nethercote 2024-07-26 09:03:30 +10:00
parent 4288edb219
commit 3d363c3d99
2 changed files with 13 additions and 13 deletions

View file

@ -457,14 +457,3 @@ impl<'a> Parser<'a> {
Err(self.dcx().create_err(err))
}
}
/// The attributes are complete if all attributes are either a doc comment or a
/// builtin attribute other than `cfg_attr`.
pub fn is_complete(attrs: &[ast::Attribute]) -> bool {
attrs.iter().all(|attr| {
attr.is_doc_comment()
|| attr.ident().is_some_and(|ident| {
ident.name != sym::cfg_attr && rustc_feature::is_builtin_attr_name(ident.name)
})
})
}