diff options
author | Aleksey Kladov <[email protected]> | 2019-01-24 23:09:31 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-24 23:09:31 +0000 |
commit | 2e354f480b0b83debc06a4311a9709cd8c0df305 (patch) | |
tree | 31b772e764f8889ca5d77add0cc3a98e85f92335 /crates/ra_syntax/src/ast/generated.rs.tera | |
parent | b308375b82a33687f93468d75c7cc628b83a1351 (diff) |
use ToOwned trait instead of inherent method
Diffstat (limited to 'crates/ra_syntax/src/ast/generated.rs.tera')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs.tera | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs.tera b/crates/ra_syntax/src/ast/generated.rs.tera index bf9db4ee8..ea0fc35fd 100644 --- a/crates/ra_syntax/src/ast/generated.rs.tera +++ b/crates/ra_syntax/src/ast/generated.rs.tera | |||
@@ -48,6 +48,10 @@ impl AstNode for {{ node }} { | |||
48 | } | 48 | } |
49 | } | 49 | } |
50 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 50 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
51 | } | ||
52 | |||
53 | impl ToOwned for {{ node }} { | ||
54 | type Owned = TreeArc<{{ node }}>; | ||
51 | fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) } | 55 | fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) } |
52 | } | 56 | } |
53 | 57 | ||
@@ -79,6 +83,10 @@ impl AstNode for {{ node }} { | |||
79 | } | 83 | } |
80 | } | 84 | } |
81 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 85 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
86 | } | ||
87 | |||
88 | impl ToOwned for {{ node }} { | ||
89 | type Owned = TreeArc<{{ node }}>; | ||
82 | fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) } | 90 | fn to_owned(&self) -> TreeArc<{{ node }}> { TreeArc::cast(self.syntax.to_owned()) } |
83 | } | 91 | } |
84 | 92 | ||