aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/autoderef.rs4
-rw-r--r--crates/ra_hir_ty/src/lib.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/autoderef.rs b/crates/ra_hir_ty/src/autoderef.rs
index ee48fa537..f32d5786a 100644
--- a/crates/ra_hir_ty/src/autoderef.rs
+++ b/crates/ra_hir_ty/src/autoderef.rs
@@ -48,7 +48,7 @@ fn deref_by_trait(
48 krate: CrateId, 48 krate: CrateId,
49 ty: InEnvironment<&Canonical<Ty>>, 49 ty: InEnvironment<&Canonical<Ty>>,
50) -> Option<Canonical<Ty>> { 50) -> Option<Canonical<Ty>> {
51 let deref_trait = match db.lang_item(krate.into(), "deref".into())? { 51 let deref_trait = match db.lang_item(krate, "deref".into())? {
52 LangItemTarget::TraitId(it) => it, 52 LangItemTarget::TraitId(it) => it,
53 _ => return None, 53 _ => return None,
54 }; 54 };
@@ -78,7 +78,7 @@ fn deref_by_trait(
78 78
79 let canonical = super::Canonical { num_vars: 1 + ty.value.num_vars, value: in_env }; 79 let canonical = super::Canonical { num_vars: 1 + ty.value.num_vars, value: in_env };
80 80
81 let solution = db.trait_solve(krate.into(), canonical)?; 81 let solution = db.trait_solve(krate, canonical)?;
82 82
83 match &solution { 83 match &solution {
84 Solution::Unique(vars) => { 84 Solution::Unique(vars) => {
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index 7310ef10d..48abf97c9 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -919,7 +919,7 @@ impl HirDisplay for ApplicationTy {
919 { 919 {
920 Option::None => self.parameters.0.as_ref(), 920 Option::None => self.parameters.0.as_ref(),
921 Option::Some(default_parameters) => { 921 Option::Some(default_parameters) => {
922 for (i, parameter) in self.parameters.into_iter().enumerate() { 922 for (i, parameter) in self.parameters.iter().enumerate() {
923 match (parameter, default_parameters.get(i)) { 923 match (parameter, default_parameters.get(i)) {
924 (&Ty::Unknown, _) | (_, None) => { 924 (&Ty::Unknown, _) | (_, None) => {
925 non_default_parameters.push(parameter.clone()) 925 non_default_parameters.push(parameter.clone())