Move is_complete
to the module that uses it.
And make it non-`pub`.
This commit is contained in:
parent
4288edb219
commit
3d363c3d99
2 changed files with 13 additions and 13 deletions
|
@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue