Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/attr.rs')
| -rw-r--r-- | crates/hir_def/src/attr.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index 383ad7f0c8..c63cd4c195 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -720,11 +720,8 @@ impl Attr { Self::from_src(db, ast, hygiene, id) } - /// Parses this attribute as a `#[derive]`, returns an iterator that yields all contained paths - /// to derive macros. - /// - /// Returns `None` when the attribute does not have a well-formed `#[derive]` attribute input. - pub(crate) fn parse_derive(&self) -> Option<impl Iterator<Item = ModPath> + '_> { + /// Parses this attribute as a token tree consisting of comma separated paths. + pub fn parse_path_comma_token_tree(&self) -> Option<impl Iterator<Item = ModPath> + '_> { let args = match self.input.as_deref() { Some(AttrInput::TokenTree(args, _)) => args, _ => return None, |