aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/type_ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/type_ref.rs')
-rw-r--r--crates/ra_hir_def/src/type_ref.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs
index 8af061116..5f10e9a88 100644
--- a/crates/ra_hir_def/src/type_ref.rs
+++ b/crates/ra_hir_def/src/type_ref.rs
@@ -64,7 +64,7 @@ pub enum TypeBound {
64 64
65impl TypeRef { 65impl TypeRef {
66 /// Converts an `ast::TypeRef` to a `hir::TypeRef`. 66 /// Converts an `ast::TypeRef` to a `hir::TypeRef`.
67 pub fn from_ast(node: ast::TypeRef) -> Self { 67 pub(crate) fn from_ast(node: ast::TypeRef) -> Self {
68 match node { 68 match node {
69 ast::TypeRef::ParenType(inner) => TypeRef::from_ast_opt(inner.type_ref()), 69 ast::TypeRef::ParenType(inner) => TypeRef::from_ast_opt(inner.type_ref()),
70 ast::TypeRef::TupleType(inner) => { 70 ast::TypeRef::TupleType(inner) => {
@@ -113,7 +113,7 @@ impl TypeRef {
113 } 113 }
114 } 114 }
115 115
116 pub fn from_ast_opt(node: Option<ast::TypeRef>) -> Self { 116 pub(crate) fn from_ast_opt(node: Option<ast::TypeRef>) -> Self {
117 if let Some(node) = node { 117 if let Some(node) = node {
118 TypeRef::from_ast(node) 118 TypeRef::from_ast(node)
119 } else { 119 } else {
@@ -121,7 +121,7 @@ impl TypeRef {
121 } 121 }
122 } 122 }
123 123
124 pub fn unit() -> TypeRef { 124 pub(crate) fn unit() -> TypeRef {
125 TypeRef::Tuple(Vec::new()) 125 TypeRef::Tuple(Vec::new())
126 } 126 }
127} 127}
@@ -135,7 +135,7 @@ pub(crate) fn type_bounds_from_ast(type_bounds_opt: Option<ast::TypeBoundList>)
135} 135}
136 136
137impl TypeBound { 137impl TypeBound {
138 pub fn from_ast(node: ast::TypeBound) -> Self { 138 pub(crate) fn from_ast(node: ast::TypeBound) -> Self {
139 match node.kind() { 139 match node.kind() {
140 ast::TypeBoundKind::PathType(path_type) => { 140 ast::TypeBoundKind::PathType(path_type) => {
141 let path = match path_type.path() { 141 let path = match path_type.path() {