1
Fork 0

Add test with multiple type params failing inference

This commit is contained in:
Esteban Kuber 2021-11-19 06:10:43 +00:00
parent 6a691b1d92
commit 7271d1f803
3 changed files with 46 additions and 15 deletions

View file

@ -939,9 +939,7 @@ impl<'tcx> ResolvedTypeParamEraser<'tcx> {
/// Replace not yet inferred const params with their def name.
fn replace_infers(&self, c: &'tcx Const<'tcx>, index: u32, name: Symbol) -> &'tcx Const<'tcx> {
match c.val {
ty::ConstKind::Infer(..) => {
self.tcx().mk_const_param(index, name, c.ty)
}
ty::ConstKind::Infer(..) => self.tcx().mk_const_param(index, name, c.ty),
_ => c,
}
}