aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-05-12 17:33:47 +0100
committerFlorian Diebold <[email protected]>2019-06-15 17:21:23 +0100
commit9c5e7dd849eff7bd6f20aa353feef083d089ff58 (patch)
tree5639ff8814d3f4ba0f5ac41de215ed3720f3d1b9 /crates/ra_hir/src/ty.rs
parent49489dc20cc9f340d43acb467677b9bc59495ed2 (diff)
Implement autoderef using the Deref trait
- add support for other lang item targets, since we need the Deref lang item
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index d9a50b230..d2f92a1f2 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -22,6 +22,7 @@ use display::{HirDisplay, HirFormatter};
22pub(crate) use lower::{TypableDef, type_for_def, type_for_field, callable_item_sig, generic_predicates, generic_defaults}; 22pub(crate) use lower::{TypableDef, type_for_def, type_for_field, callable_item_sig, generic_predicates, generic_defaults};
23pub(crate) use infer::{infer_query, InferenceResult, InferTy}; 23pub(crate) use infer::{infer_query, InferenceResult, InferTy};
24pub use lower::CallableDef; 24pub use lower::CallableDef;
25pub(crate) use autoderef::autoderef;
25 26
26/// A type constructor or type name: this might be something like the primitive 27/// A type constructor or type name: this might be something like the primitive
27/// type `bool`, a struct like `Vec`, or things like function pointers or 28/// type `bool`, a struct like `Vec`, or things like function pointers or
@@ -225,8 +226,8 @@ impl Deref for Substs {
225#[derive(Clone, PartialEq, Eq, Debug, Hash)] 226#[derive(Clone, PartialEq, Eq, Debug, Hash)]
226pub struct TraitRef { 227pub struct TraitRef {
227 /// FIXME name? 228 /// FIXME name?
228 trait_: Trait, 229 pub trait_: Trait,
229 substs: Substs, 230 pub substs: Substs,
230} 231}
231 232
232impl TraitRef { 233impl TraitRef {