diff options
author | Florian Diebold <[email protected]> | 2018-12-30 18:59:49 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-01-04 18:16:39 +0000 |
commit | 334ca0d9a790d14414301daa896848bf9a880982 (patch) | |
tree | 52e44320860cbba2fabb6322d9746d77822c0d1e /crates/ra_hir/src/ty.rs | |
parent | bb029cd29b8496e69ca625fabc3612e4c1fe9142 (diff) |
Rename ImplBlock::target -> target_type, and add target_trait already
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 45a01679c..e33762e0d 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -306,7 +306,7 @@ impl Ty { | |||
306 | } else if let Some(float_ty) = primitive::FloatTy::from_name(name) { | 306 | } else if let Some(float_ty) = primitive::FloatTy::from_name(name) { |
307 | return Ok(Ty::Float(float_ty)); | 307 | return Ok(Ty::Float(float_ty)); |
308 | } else if name.as_known_name() == Some(KnownName::Self_) { | 308 | } else if name.as_known_name() == Some(KnownName::Self_) { |
309 | return Ty::from_hir_opt(db, module, None, impl_block.map(|i| i.target())); | 309 | return Ty::from_hir_opt(db, module, None, impl_block.map(|i| i.target_type())); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
@@ -972,7 +972,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
972 | self.insert_type_vars(ty) | 972 | self.insert_type_vars(ty) |
973 | } else { | 973 | } else { |
974 | // TODO this should be handled by desugaring during HIR conversion | 974 | // TODO this should be handled by desugaring during HIR conversion |
975 | let ty = self.make_ty_opt(self.impl_block.as_ref().map(|i| i.target()))?; | 975 | let ty = self.make_ty_opt(self.impl_block.as_ref().map(|i| i.target_type()))?; |
976 | let ty = match self_param.flavor() { | 976 | let ty = match self_param.flavor() { |
977 | ast::SelfParamFlavor::Owned => ty, | 977 | ast::SelfParamFlavor::Owned => ty, |
978 | ast::SelfParamFlavor::Ref => Ty::Ref(Arc::new(ty), Mutability::Shared), | 978 | ast::SelfParamFlavor::Ref => Ty::Ref(Arc::new(ty), Mutability::Shared), |