diff options
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r-- | crates/ra_hir_expand/src/ast_id_map.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_expand/src/quote.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_expand/src/ast_id_map.rs b/crates/ra_hir_expand/src/ast_id_map.rs index 5643ecdce..a3ca302c2 100644 --- a/crates/ra_hir_expand/src/ast_id_map.rs +++ b/crates/ra_hir_expand/src/ast_id_map.rs | |||
@@ -90,7 +90,7 @@ impl AstIdMap { | |||
90 | } | 90 | } |
91 | 91 | ||
92 | pub(crate) fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> { | 92 | pub(crate) fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> { |
93 | self.arena[id.raw].cast::<N>().unwrap() | 93 | self.arena[id.raw].clone().cast::<N>().unwrap() |
94 | } | 94 | } |
95 | 95 | ||
96 | fn alloc(&mut self, item: &SyntaxNode) -> ErasedFileAstId { | 96 | fn alloc(&mut self, item: &SyntaxNode) -> ErasedFileAstId { |
diff --git a/crates/ra_hir_expand/src/quote.rs b/crates/ra_hir_expand/src/quote.rs index 3fd4233da..219bc2097 100644 --- a/crates/ra_hir_expand/src/quote.rs +++ b/crates/ra_hir_expand/src/quote.rs | |||
@@ -232,7 +232,7 @@ mod tests { | |||
232 | let quoted = quote!(#a); | 232 | let quoted = quote!(#a); |
233 | assert_eq!(quoted.to_string(), "hello"); | 233 | assert_eq!(quoted.to_string(), "hello"); |
234 | let t = format!("{:?}", quoted); | 234 | let t = format!("{:?}", quoted); |
235 | assert_eq!(t, "Subtree { delimiter: None, token_trees: [Leaf(Ident(Ident { text: \"hello\", id: TokenId(4294967295) }))] }"); | 235 | assert_eq!(t, "SUBTREE $\n IDENT hello 4294967295"); |
236 | } | 236 | } |
237 | 237 | ||
238 | #[test] | 238 | #[test] |