aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-21 06:12:36 +0000
committerGitHub <[email protected]>2019-12-21 06:12:36 +0000
commit1cbef27ff857803fbee123e6730b83e1ef154f6c (patch)
tree7d45ce377fb8f4c7019bb74381228b94f397110f /crates/ra_hir_ty
parent6eab968c601637361e8fbd1ee93ded1b0d967bee (diff)
parent0d5d63a80ea08f2af439bcc72fff9b24d144c70d (diff)
Merge #2625
2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
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())