diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-11 10:37:35 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-11 10:37:35 +0300 |
| commit | c867288d1b05bb7b4e069e3fd6c2d16bdc2bfd4b (patch) | |
| tree | b5e5b4572532856e412d15ec05337cc1e337a35e /src/tools/rust-analyzer/crates/syntax | |
| parent | 518263d889818d16a09a8260f212f8ff4bf345f1 (diff) | |
| parent | 61504c8d951c566eb03037dcb300c96f4bd9a8b6 (diff) | |
:arrow_up: rust-analyzer
Diffstat (limited to 'src/tools/rust-analyzer/crates/syntax')
| -rw-r--r-- | src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs index bb92c51e9a9..fe82aa90722 100644 --- a/src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs +++ b/src/tools/rust-analyzer/crates/syntax/src/ast/node_ext.rs @@ -873,3 +873,33 @@ impl ast::MatchGuard { support::child(&self.syntax) } } + +impl From<ast::Item> for ast::AnyHasAttrs { + fn from(node: ast::Item) -> Self { + Self::new(node) + } +} + +impl From<ast::AssocItem> for ast::AnyHasAttrs { + fn from(node: ast::AssocItem) -> Self { + Self::new(node) + } +} + +impl From<ast::Variant> for ast::AnyHasAttrs { + fn from(node: ast::Variant) -> Self { + Self::new(node) + } +} + +impl From<ast::RecordField> for ast::AnyHasAttrs { + fn from(node: ast::RecordField) -> Self { + Self::new(node) + } +} + +impl From<ast::TupleField> for ast::AnyHasAttrs { + fn from(node: ast::TupleField) -> Self { + Self::new(node) + } +} |
