aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-02-21 20:25:27 +0000
committerFlorian Diebold <[email protected]>2019-02-21 20:25:27 +0000
commitdb9a5a9ac047ed13aebd136edaabd4309f442e99 (patch)
tree4cdc0494cab798d9a43979b2208e77e15e8d3390 /crates
parent72712b8a428e17d63c413522c770e8f1f0587455 (diff)
Add an assert (and fix the other)
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/ty.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 7f28a6edd..1a3e1994f 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -443,7 +443,7 @@ impl Ty {
443 for _ in supplied_params..def_generics.count_params_including_parent() { 443 for _ in supplied_params..def_generics.count_params_including_parent() {
444 substs.push(Ty::Unknown); 444 substs.push(Ty::Unknown);
445 } 445 }
446 assert_eq!(substs.len(), def_generics.params.len()); 446 assert_eq!(substs.len(), def_generics.count_params_including_parent());
447 Substs(substs.into()) 447 Substs(substs.into())
448 } 448 }
449 449
@@ -1374,6 +1374,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1374 for _ in supplied_params..parent_param_count + param_count { 1374 for _ in supplied_params..parent_param_count + param_count {
1375 substs.push(Ty::Unknown); 1375 substs.push(Ty::Unknown);
1376 } 1376 }
1377 assert_eq!(substs.len(), parent_param_count + param_count);
1377 Substs(substs.into()) 1378 Substs(substs.into())
1378 } 1379 }
1379 1380