mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
Add an assert (and fix the other)
This commit is contained in:
@@ -443,7 +443,7 @@ fn substs_from_path(
|
||||
for _ in supplied_params..def_generics.count_params_including_parent() {
|
||||
substs.push(Ty::Unknown);
|
||||
}
|
||||
assert_eq!(substs.len(), def_generics.params.len());
|
||||
assert_eq!(substs.len(), def_generics.count_params_including_parent());
|
||||
Substs(substs.into())
|
||||
}
|
||||
|
||||
@@ -1374,6 +1374,7 @@ fn substs_for_method_call(
|
||||
for _ in supplied_params..parent_param_count + param_count {
|
||||
substs.push(Ty::Unknown);
|
||||
}
|
||||
assert_eq!(substs.len(), parent_param_count + param_count);
|
||||
Substs(substs.into())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user