Avoid referring to the item tree except in the def map

Item tree IDs are very unstable (adding an item of a kind invalidates all following items of the same kind). Instead use ast ids, which, since the previous commit, are pretty stable.
This commit is contained in:
Chayim Refael Friedman 2025-05-21 13:13:34 +03:00
parent 4bcf03e28b
commit ed0b4506dd
37 changed files with 981 additions and 955 deletions

View file

@ -626,7 +626,7 @@ fn private_vis() -> RawVisibility {
)
}
fn visibility_from_ast(
pub(crate) fn visibility_from_ast(
db: &dyn DefDatabase,
node: Option<ast::Visibility>,
span_for_range: &mut dyn FnMut(::tt::TextRange) -> SyntaxContext,