fix: Deduplicate annotations

This commit is contained in:
Lukas Wirth 2023-12-19 08:30:48 +01:00
parent ae2c3223b0
commit 002e611d09
7 changed files with 179 additions and 182 deletions

View file

@ -342,7 +342,7 @@ impl InFile<TextRange> {
}
impl<N: AstNode> InFile<N> {
pub fn original_ast_node(self, db: &dyn db::ExpandDatabase) -> Option<InRealFile<N>> {
pub fn original_ast_node_rooted(self, db: &dyn db::ExpandDatabase) -> Option<InRealFile<N>> {
// This kind of upmapping can only be achieved in attribute expanded files,
// as we don't have node inputs otherwise and therefore can't find an `N` node in the input
let file_id = match self.file_id.repr() {