Don't use non cache syntaxnodes in generate_function for lookups

This commit is contained in:
Lukas Wirth 2021-08-14 17:42:06 +02:00
parent c1a7169bf0
commit 37ad9cb2a5
4 changed files with 32 additions and 40 deletions

View file

@ -884,6 +884,7 @@ to_def_impls![
(crate::Local, ast::IdentPat, bind_pat_to_def),
(crate::Local, ast::SelfParam, self_param_to_def),
(crate::Label, ast::Label, label_to_def),
(crate::Adt, ast::Adt, adt_to_def),
];
fn find_root(node: &SyntaxNode) -> SyntaxNode {