Use index newtyping for TyVid
This commit is contained in:
parent
1698e3cac5
commit
2eac09d258
5 changed files with 21 additions and 26 deletions
|
@ -1244,7 +1244,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
let sig = if let ty::Tuple(inputs) = inputs.kind() {
|
||||
tcx.mk_fn_sig(
|
||||
inputs.iter().map(|k| k.expect_ty()),
|
||||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
|
||||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid::from_u32(0))),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
abi::Abi::Rust,
|
||||
|
@ -1252,7 +1252,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
} else {
|
||||
tcx.mk_fn_sig(
|
||||
std::iter::once(inputs),
|
||||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
|
||||
tcx.mk_ty_infer(ty::TyVar(ty::TyVid::from_u32(0))),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
abi::Abi::Rust,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue