Cache Hygiene in DefCollector

This commit is contained in:
Ryo Yoshida 2023-04-22 18:22:29 +09:00
parent cf72b6232b
commit 85e76542fe
No known key found for this signature in database
GPG key ID: E25698A930586171
2 changed files with 24 additions and 4 deletions

View file

@ -269,7 +269,7 @@ impl Attr {
pub fn parse_path_comma_token_tree<'a>(
&'a self,
db: &'a dyn ExpandDatabase,
hygiene: Hygiene,
hygiene: &'a Hygiene,
) -> Option<impl Iterator<Item = ModPath> + 'a> {
let args = self.token_tree_value()?;
@ -297,7 +297,7 @@ impl Attr {
return None;
}
let path = meta.path()?;
ModPath::from_src(db, path, &hygiene)
ModPath::from_src(db, path, hygiene)
});
Some(paths)