aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lower.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-01-03 13:57:11 +0000
committerFlorian Diebold <[email protected]>2020-01-03 13:57:11 +0000
commit67240c8d915110fa0ad7392bb9a56e18e3bcf234 (patch)
tree7116d577e93d9265f584f708a31e720e9abb5e29 /crates/ra_hir_ty/src/lower.rs
parent15d94cbffcb07fa910d715b2acef88109ae24d39 (diff)
Fix #2705
The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution.
Diffstat (limited to 'crates/ra_hir_ty/src/lower.rs')
-rw-r--r--crates/ra_hir_ty/src/lower.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs
index af3db2e1d..2c2ecee9c 100644
--- a/crates/ra_hir_ty/src/lower.rs
+++ b/crates/ra_hir_ty/src/lower.rs
@@ -331,7 +331,7 @@ pub(super) fn substs_from_path_segment(
331 if let Some(generic_args) = &segment.args_and_bindings { 331 if let Some(generic_args) = &segment.args_and_bindings {
332 // if args are provided, it should be all of them, but we can't rely on that 332 // if args are provided, it should be all of them, but we can't rely on that
333 let self_param_correction = if add_self_param { 1 } else { 0 }; 333 let self_param_correction = if add_self_param { 1 } else { 0 };
334 let child_len = child_len + self_param_correction; 334 let child_len = child_len - self_param_correction;
335 for arg in generic_args.args.iter().take(child_len) { 335 for arg in generic_args.args.iter().take(child_len) {
336 match arg { 336 match arg {
337 GenericArg::Type(type_ref) => { 337 GenericArg::Type(type_ref) => {