]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir_expand/src/lib.rs
Merge #10778
[rust.git] / crates / hir_expand / src / lib.rs
index 671fcb0ba8bc5911130eb820d2761ab05fa51a73..fdb639f55d2ecf09110969b699e2b53e91ab8b64 100644 (file)
@@ -701,16 +701,6 @@ pub fn syntax(&self) -> InFile<&SyntaxNode> {
     }
 }
 
-impl InFile<ast::Fn> {
-    pub fn map_out_of_test_attr(self, db: &dyn db::AstDatabase) -> InFile<ast::Fn> {
-        (|| {
-            let InFile { file_id, value } = self.file_id.call_node(db)?;
-            ast::Fn::cast(value).map(|n| InFile::new(file_id, n))
-        })()
-        .unwrap_or(self)
-    }
-}
-
 /// In Rust, macros expand token trees to token trees. When we want to turn a
 /// token tree into an AST node, we need to figure out what kind of AST node we
 /// want: something like `foo` can be a type, an expression, or a pattern.