aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-04 23:14:46 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-04 23:14:46 +0100
commit5deb907b4321d8328978d3322b0826b781814452 (patch)
tree2baa3b75b1ef62c02617c37ba9b800c41a3dd102 /crates/ra_hir/src/ty.rs
parent8bd0e844247dc28d6ceb24b00f3cc3396bd5bf03 (diff)
parentaa30c4909ebb1e85f1591f465c9e2875aa4d394e (diff)
Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go. cc #848 Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 76d34c12b..4a37e0268 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -451,7 +451,7 @@ impl Ty {
451 /// Substitutes `Ty::Bound` vars (as opposed to type parameters). 451 /// Substitutes `Ty::Bound` vars (as opposed to type parameters).
452 pub fn subst_bound_vars(self, substs: &Substs) -> Ty { 452 pub fn subst_bound_vars(self, substs: &Substs) -> Ty {
453 self.fold(&mut |ty| match ty { 453 self.fold(&mut |ty| match ty {
454 Ty::Bound(idx) => substs.get(idx as usize).cloned().unwrap_or(Ty::Bound(idx)), 454 Ty::Bound(idx) => substs.get(idx as usize).cloned().unwrap_or_else(|| Ty::Bound(idx)),
455 ty => ty, 455 ty => ty,
456 }) 456 })
457 } 457 }