aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/adt.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2018-12-25 20:14:13 +0000
committerFlorian Diebold <[email protected]>2018-12-25 20:14:13 +0000
commitcdca39706121b2d1734a94938a2372da881e10c6 (patch)
treed3f9687371eb1a7004c4694c59445af388eb1876 /crates/ra_hir/src/adt.rs
parent2870effd5c69941bbf32a44c0ee6d9d42e0b038d (diff)
Add a hir::TypeRef as an intermediate between ast::TypeRef and ty::Ty
Diffstat (limited to 'crates/ra_hir/src/adt.rs')
-rw-r--r--crates/ra_hir/src/adt.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs
index 40a45b831..dae04d258 100644
--- a/crates/ra_hir/src/adt.rs
+++ b/crates/ra_hir/src/adt.rs
@@ -145,7 +145,7 @@ impl VariantData {
145 .map(|(i, fd)| { 145 .map(|(i, fd)| {
146 Ok(StructField { 146 Ok(StructField {
147 name: SmolStr::new(i.to_string()), 147 name: SmolStr::new(i.to_string()),
148 ty: Ty::new_opt(db, &module, fd.type_ref())?, 148 ty: Ty::from_ast_opt(db, &module, fd.type_ref())?,
149 }) 149 })
150 }) 150 })
151 .collect::<Cancelable<_>>()?; 151 .collect::<Cancelable<_>>()?;
@@ -160,7 +160,7 @@ impl VariantData {
160 .name() 160 .name()
161 .map(|n| n.text()) 161 .map(|n| n.text())
162 .unwrap_or_else(|| SmolStr::new("[error]")), 162 .unwrap_or_else(|| SmolStr::new("[error]")),
163 ty: Ty::new_opt(db, &module, fd.type_ref())?, 163 ty: Ty::from_ast_opt(db, &module, fd.type_ref())?,
164 }) 164 })
165 }) 165 })
166 .collect::<Cancelable<_>>()?; 166 .collect::<Cancelable<_>>()?;