Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
| -rw-r--r-- | crates/hir_expand/src/lib.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs index a0a79b2b4c..0c4fdfa0fe 100644 --- a/crates/hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -699,23 +699,6 @@ impl<N: AstNode> InFile<N> { pub fn syntax(&self) -> InFile<&SyntaxNode> { self.with_value(self.value.syntax()) } - - pub fn nodes_with_attributes<'db>( - self, - db: &'db dyn db::AstDatabase, - ) -> impl Iterator<Item = InFile<N>> + 'db - where - N: 'db, - { - iter::successors(Some(self), move |node| { - let InFile { file_id, value } = node.file_id.call_node(db)?; - N::cast(value).map(|n| InFile::new(file_id, n)) - }) - } - - pub fn node_with_attributes(self, db: &dyn db::AstDatabase) -> InFile<N> { - self.nodes_with_attributes(db).last().unwrap() - } } /// In Rust, macros expand token trees to token trees. When we want to turn a |