Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/ast_id_map.rs')
| -rw-r--r-- | crates/hir_expand/src/ast_id_map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_expand/src/ast_id_map.rs b/crates/hir_expand/src/ast_id_map.rs index 43c8a3db5c..c1ddef03ba 100644 --- a/crates/hir_expand/src/ast_id_map.rs +++ b/crates/hir_expand/src/ast_id_map.rs @@ -137,7 +137,7 @@ impl AstIdMap { } pub fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> { - self.arena[id.raw].clone().cast::<N>().unwrap() + AstPtr::try_from_raw(self.arena[id.raw].clone()).unwrap() } fn alloc(&mut self, item: &SyntaxNode) -> ErasedFileAstId { |