diff options
Diffstat (limited to 'crates/ra_hir/src/type_ref.rs')
-rw-r--r-- | crates/ra_hir/src/type_ref.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/type_ref.rs b/crates/ra_hir/src/type_ref.rs index 8aa807648..8536ae44a 100644 --- a/crates/ra_hir/src/type_ref.rs +++ b/crates/ra_hir/src/type_ref.rs | |||
@@ -56,7 +56,7 @@ pub enum TypeRef { | |||
56 | 56 | ||
57 | impl TypeRef { | 57 | impl TypeRef { |
58 | /// Converts an `ast::TypeRef` to a `hir::TypeRef`. | 58 | /// Converts an `ast::TypeRef` to a `hir::TypeRef`. |
59 | pub(crate) fn from_ast(node: &ast::TypeRef) -> Self { | 59 | pub(crate) fn from_ast(node: ast::TypeRef) -> Self { |
60 | use ra_syntax::ast::TypeRefKind::*; | 60 | use ra_syntax::ast::TypeRefKind::*; |
61 | match node.kind() { | 61 | match node.kind() { |
62 | ParenType(inner) => TypeRef::from_ast_opt(inner.type_ref()), | 62 | ParenType(inner) => TypeRef::from_ast_opt(inner.type_ref()), |
@@ -95,7 +95,7 @@ impl TypeRef { | |||
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | pub(crate) fn from_ast_opt(node: Option<&ast::TypeRef>) -> Self { | 98 | pub(crate) fn from_ast_opt(node: Option<ast::TypeRef>) -> Self { |
99 | if let Some(node) = node { | 99 | if let Some(node) = node { |
100 | TypeRef::from_ast(node) | 100 | TypeRef::from_ast(node) |
101 | } else { | 101 | } else { |