Skip to content

Commit dcca6a3

Browse files
committed
Auto merge of rust-lang#108250 - nnethercote:rename-interner-funcs, r=compiler-errors
Rename interner funcs This PR cleans up some inconsistencies in interner naming. Best reviewed one commit at a time. r? `@compiler-errors`
2 parents 26c9868 + 08f28f9 commit dcca6a3

File tree

111 files changed

+450
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+450
-471
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
14941494
assert!(root_place.projection.is_empty());
14951495
let proper_span = self.body.local_decls[root_place.local].source_info.span;
14961496

1497-
let root_place_projection = self.infcx.tcx.intern_place_elems(root_place.projection);
1497+
let root_place_projection = self.infcx.tcx.mk_place_elems(root_place.projection);
14981498

14991499
if self.access_place_error_reported.contains(&(
15001500
Place { local: root_place.local, projection: root_place_projection },

compiler/rustc_borrowck/src/type_check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
26332633
DefKind::InlineConst => substs.as_inline_const().parent_substs(),
26342634
other => bug!("unexpected item {:?}", other),
26352635
};
2636-
let parent_substs = tcx.intern_substs(parent_substs);
2636+
let parent_substs = tcx.mk_substs(parent_substs);
26372637

26382638
assert_eq!(typeck_root_substs.len(), parent_substs.len());
26392639
if let Err(_) = self.eq_substs(

compiler/rustc_borrowck/src/universal_regions.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
516516
let va_list_ty =
517517
self.infcx.tcx.type_of(va_list_did).subst(self.infcx.tcx, &[region.into()]);
518518

519-
unnormalized_input_tys = self.infcx.tcx.mk_type_list(
519+
unnormalized_input_tys = self.infcx.tcx.mk_type_list_from_iter(
520520
unnormalized_input_tys.iter().copied().chain(iter::once(va_list_ty)),
521521
);
522522
}
@@ -656,7 +656,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
656656
assert_eq!(self.mir_def.did.to_def_id(), def_id);
657657
let closure_sig = substs.as_closure().sig();
658658
let inputs_and_output = closure_sig.inputs_and_output();
659-
let bound_vars = tcx.mk_bound_variable_kinds(
659+
let bound_vars = tcx.mk_bound_variable_kinds_from_iter(
660660
inputs_and_output
661661
.bound_vars()
662662
.iter()
@@ -680,7 +680,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
680680
};
681681

682682
ty::Binder::bind_with_vars(
683-
tcx.mk_type_list(
683+
tcx.mk_type_list_from_iter(
684684
iter::once(closure_ty).chain(inputs).chain(iter::once(output)),
685685
),
686686
bound_vars,
@@ -693,7 +693,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
693693
let output = substs.as_generator().return_ty();
694694
let generator_ty = tcx.mk_generator(def_id, substs, movability);
695695
let inputs_and_output =
696-
self.infcx.tcx.intern_type_list(&[generator_ty, resume_ty, output]);
696+
self.infcx.tcx.mk_type_list(&[generator_ty, resume_ty, output]);
697697
ty::Binder::dummy(inputs_and_output)
698698
}
699699

@@ -709,13 +709,13 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
709709
assert_eq!(self.mir_def.did.to_def_id(), def_id);
710710
let ty = tcx.type_of(self.mir_def.def_id_for_type_of()).subst_identity();
711711
let ty = indices.fold_to_region_vids(tcx, ty);
712-
ty::Binder::dummy(tcx.intern_type_list(&[ty]))
712+
ty::Binder::dummy(tcx.mk_type_list(&[ty]))
713713
}
714714

715715
DefiningTy::InlineConst(def_id, substs) => {
716716
assert_eq!(self.mir_def.did.to_def_id(), def_id);
717717
let ty = substs.as_inline_const().ty();
718-
ty::Binder::dummy(tcx.intern_type_list(&[ty]))
718+
ty::Binder::dummy(tcx.mk_type_list(&[ty]))
719719
}
720720
}
721721
}

compiler/rustc_codegen_cranelift/src/abi/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
405405
};
406406

407407
let extra_args = &args[fn_sig.inputs().skip_binder().len()..];
408-
let extra_args = fx
409-
.tcx
410-
.mk_type_list(extra_args.iter().map(|op_arg| fx.monomorphize(op_arg.ty(fx.mir, fx.tcx))));
408+
let extra_args = fx.tcx.mk_type_list_from_iter(
409+
extra_args.iter().map(|op_arg| fx.monomorphize(op_arg.ty(fx.mir, fx.tcx))),
410+
);
411411
let fn_abi = if let Some(instance) = instance {
412412
RevealAllLayoutCx(fx.tcx).fn_abi_of_instance(instance, extra_args)
413413
} else {

compiler/rustc_codegen_cranelift/src/codegen_i128.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub(crate) fn maybe_codegen<'tcx>(
5656
Some(fx.easy_call("__multi3", &[lhs, rhs], val_ty))
5757
}
5858
} else {
59-
let out_ty = fx.tcx.intern_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
59+
let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
6060
let oflow = CPlace::new_stack_slot(fx, fx.layout_of(fx.tcx.types.i32));
6161
let lhs = lhs.load_scalar(fx);
6262
let rhs = rhs.load_scalar(fx);
@@ -78,7 +78,7 @@ pub(crate) fn maybe_codegen<'tcx>(
7878
}
7979
BinOp::Add | BinOp::Sub | BinOp::Mul => {
8080
assert!(checked);
81-
let out_ty = fx.tcx.intern_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
81+
let out_ty = fx.tcx.mk_tup(&[lhs.layout().ty, fx.tcx.types.bool]);
8282
let out_place = CPlace::new_stack_slot(fx, fx.layout_of(out_ty));
8383
let (param_types, args) = if fx.tcx.sess.target.is_like_windows {
8484
let (lhs_ptr, lhs_extra) = lhs.force_stack(fx);

compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn llvm_add_sub<'tcx>(
191191
// carry0 | carry1 -> carry or borrow respectively
192192
let cb_out = fx.bcx.ins().bor(cb0, cb1);
193193

194-
let layout = fx.layout_of(fx.tcx.intern_tup(&[fx.tcx.types.u8, fx.tcx.types.u64]));
194+
let layout = fx.layout_of(fx.tcx.mk_tup(&[fx.tcx.types.u8, fx.tcx.types.u64]));
195195
let val = CValue::by_val_pair(cb_out, c, layout);
196196
ret.write_cvalue(fx, val);
197197
}

compiler/rustc_codegen_cranelift/src/main_shim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub(crate) fn maybe_create_entry_wrapper(
119119
tcx,
120120
ParamEnv::reveal_all(),
121121
report.def_id,
122-
tcx.intern_substs(&[GenericArg::from(main_ret_ty)]),
122+
tcx.mk_substs(&[GenericArg::from(main_ret_ty)]),
123123
)
124124
.unwrap()
125125
.unwrap()
@@ -146,7 +146,7 @@ pub(crate) fn maybe_create_entry_wrapper(
146146
tcx,
147147
ParamEnv::reveal_all(),
148148
start_def_id,
149-
tcx.intern_substs(&[main_ret_ty.into()]),
149+
tcx.mk_substs(&[main_ret_ty.into()]),
150150
)
151151
.unwrap()
152152
.unwrap()

compiler/rustc_codegen_cranelift/src/num.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub(crate) fn codegen_checked_int_binop<'tcx>(
289289
_ => bug!("binop {:?} on checked int/uint lhs: {:?} rhs: {:?}", bin_op, in_lhs, in_rhs),
290290
};
291291

292-
let out_layout = fx.layout_of(fx.tcx.intern_tup(&[in_lhs.layout().ty, fx.tcx.types.bool]));
292+
let out_layout = fx.layout_of(fx.tcx.mk_tup(&[in_lhs.layout().ty, fx.tcx.types.bool]));
293293
CValue::by_val_pair(res, has_overflow, out_layout)
294294
}
295295

compiler/rustc_codegen_gcc/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
383383
tcx,
384384
ty::ParamEnv::reveal_all(),
385385
def_id,
386-
tcx.intern_substs(&[]),
386+
ty::List::empty(),
387387
)
388388
.unwrap().unwrap(),
389389
),

compiler/rustc_codegen_llvm/src/context.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,9 @@ impl<'ll, 'tcx> MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
520520
let tcx = self.tcx;
521521
let llfn = match tcx.lang_items().eh_personality() {
522522
Some(def_id) if !wants_msvc_seh(self.sess()) => self.get_fn_addr(
523-
ty::Instance::resolve(
524-
tcx,
525-
ty::ParamEnv::reveal_all(),
526-
def_id,
527-
tcx.intern_substs(&[]),
528-
)
529-
.unwrap()
530-
.unwrap(),
523+
ty::Instance::resolve(tcx, ty::ParamEnv::reveal_all(), def_id, ty::List::empty())
524+
.unwrap()
525+
.unwrap(),
531526
),
532527
_ => {
533528
let name = if wants_msvc_seh(self.sess()) {

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ fn upstream_monomorphizations_provider(
373373
ExportedSymbol::Generic(def_id, substs) => (def_id, substs),
374374
ExportedSymbol::DropGlue(ty) => {
375375
if let Some(drop_in_place_fn_def_id) = drop_in_place_fn_def_id {
376-
(drop_in_place_fn_def_id, tcx.intern_substs(&[ty.into()]))
376+
(drop_in_place_fn_def_id, tcx.mk_substs(&[ty.into()]))
377377
} else {
378378
// `drop_in_place` in place does not exist, don't try
379379
// to use it.

compiler/rustc_codegen_ssa/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ pub fn maybe_create_entry_wrapper<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
476476
cx.tcx(),
477477
ty::ParamEnv::reveal_all(),
478478
start_def_id,
479-
cx.tcx().intern_substs(&[main_ret_ty.into()]),
479+
cx.tcx().mk_substs(&[main_ret_ty.into()]),
480480
)
481481
.unwrap()
482482
.unwrap(),

compiler/rustc_codegen_ssa/src/mir/block.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
783783
};
784784

785785
let extra_args = &args[sig.inputs().skip_binder().len()..];
786-
let extra_args = bx.tcx().mk_type_list(extra_args.iter().map(|op_arg| {
786+
let extra_args = bx.tcx().mk_type_list_from_iter(extra_args.iter().map(|op_arg| {
787787
let op_ty = op_arg.ty(self.mir, bx.tcx());
788788
self.monomorphize(op_ty)
789789
}));
@@ -1547,7 +1547,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
15471547
slot
15481548
} else {
15491549
let layout = cx.layout_of(
1550-
cx.tcx().intern_tup(&[cx.tcx().mk_mut_ptr(cx.tcx().types.u8), cx.tcx().types.i32]),
1550+
cx.tcx().mk_tup(&[cx.tcx().mk_mut_ptr(cx.tcx().types.u8), cx.tcx().types.i32]),
15511551
);
15521552
let slot = PlaceRef::alloca(bx, layout);
15531553
self.personality_slot = Some(slot);

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
413413
lhs.layout.ty,
414414
);
415415
let val_ty = op.ty(bx.tcx(), lhs.layout.ty, rhs.layout.ty);
416-
let operand_ty = bx.tcx().intern_tup(&[val_ty, bx.tcx().types.bool]);
416+
let operand_ty = bx.tcx().mk_tup(&[val_ty, bx.tcx().types.bool]);
417417
OperandRef { val: result, layout: bx.cx().layout_of(operand_ty) }
418418
}
419419

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub(super) fn op_to_const<'tcx>(
180180
(ecx.tcx.global_alloc(alloc_id).unwrap_memory(), offset.bytes())
181181
}
182182
(None, _offset) => (
183-
ecx.tcx.intern_const_alloc(Allocation::from_bytes_byte_aligned_immutable(
183+
ecx.tcx.mk_const_alloc(Allocation::from_bytes_byte_aligned_immutable(
184184
b"" as &[u8],
185185
)),
186186
0,

compiler/rustc_const_eval/src/interpret/intern.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn intern_shallow<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx, const_eval:
135135
};
136136
// link the alloc id to the actual allocation
137137
leftover_allocations.extend(alloc.provenance().ptrs().iter().map(|&(_, alloc_id)| alloc_id));
138-
let alloc = tcx.intern_const_alloc(alloc);
138+
let alloc = tcx.mk_const_alloc(alloc);
139139
tcx.set_alloc_id_memory(alloc_id, alloc);
140140
None
141141
}
@@ -437,7 +437,7 @@ pub fn intern_const_alloc_recursive<
437437
alloc.mutability = Mutability::Not;
438438
}
439439
}
440-
let alloc = tcx.intern_const_alloc(alloc);
440+
let alloc = tcx.mk_const_alloc(alloc);
441441
tcx.set_alloc_id_memory(alloc_id, alloc);
442442
for &(_, alloc_id) in alloc.inner().provenance().ptrs().iter() {
443443
if leftover_allocations.insert(alloc_id) {
@@ -479,6 +479,6 @@ impl<'mir, 'tcx: 'mir, M: super::intern::CompileTimeMachine<'mir, 'tcx, !>>
479479
f(self, &dest.into())?;
480480
let mut alloc = self.memory.alloc_map.remove(&dest.ptr.provenance.unwrap()).unwrap().1;
481481
alloc.mutability = Mutability::Not;
482-
Ok(self.tcx.intern_const_alloc(alloc))
482+
Ok(self.tcx.mk_const_alloc(alloc))
483483
}
484484
}

compiler/rustc_const_eval/src/interpret/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn numeric_intrinsic<Prov>(name: Symbol, bits: u128, kind: Primitive) -> Scalar<
4545
pub(crate) fn alloc_type_name<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> ConstAllocation<'tcx> {
4646
let path = crate::util::type_name(tcx, ty);
4747
let alloc = Allocation::from_bytes_byte_aligned_immutable(path.into_bytes());
48-
tcx.intern_const_alloc(alloc)
48+
tcx.mk_const_alloc(alloc)
4949
}
5050

5151
/// The logic for all nullary intrinsics is implemented here. These intrinsics don't get evaluated

compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
9696
let loc_ty = self
9797
.tcx
9898
.type_of(self.tcx.require_lang_item(LangItem::PanicLocation, None))
99-
.subst(*self.tcx, self.tcx.intern_substs(&[self.tcx.lifetimes.re_erased.into()]));
99+
.subst(*self.tcx, self.tcx.mk_substs(&[self.tcx.lifetimes.re_erased.into()]));
100100
let loc_layout = self.layout_of(loc_ty).unwrap();
101101
let location = self.allocate(loc_layout, MemoryKind::CallerLocation).unwrap();
102102

compiler/rustc_const_eval/src/interpret/operator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
1919
) -> InterpResult<'tcx> {
2020
let (val, overflowed, ty) = self.overflowing_binary_op(op, &left, &right)?;
2121
debug_assert_eq!(
22-
self.tcx.intern_tup(&[ty, self.tcx.types.bool]),
22+
self.tcx.mk_tup(&[ty, self.tcx.types.bool]),
2323
dest.layout.ty,
2424
"type mismatch for result of {:?}",
2525
op,

compiler/rustc_const_eval/src/interpret/terminator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
7373
let fn_sig =
7474
self.tcx.normalize_erasing_late_bound_regions(self.param_env, fn_sig_binder);
7575
let extra_args = &args[fn_sig.inputs().len()..];
76-
let extra_args = self.tcx.mk_type_list(extra_args.iter().map(|arg| arg.layout.ty));
76+
let extra_args =
77+
self.tcx.mk_type_list_from_iter(extra_args.iter().map(|arg| arg.layout.ty));
7778

7879
let (fn_val, fn_abi, with_caller_location) = match *func.layout.ty.kind() {
7980
ty::FnPtr(_sig) => {

compiler/rustc_const_eval/src/transform/promote_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
866866

867867
let mut projection = vec![PlaceElem::Deref];
868868
projection.extend(place.projection);
869-
place.projection = tcx.intern_place_elems(&projection);
869+
place.projection = tcx.mk_place_elems(&projection);
870870

871871
// Create a temp to hold the promoted reference.
872872
// This is because `*r` requires `r` to be a local,

compiler/rustc_const_eval/src/transform/validate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
315315
}
316316
}
317317
ProjectionElem::Field(f, ty) => {
318-
let parent = Place { local, projection: self.tcx.intern_place_elems(proj_base) };
318+
let parent = Place { local, projection: self.tcx.mk_place_elems(proj_base) };
319319
let parent_ty = parent.ty(&self.body.local_decls, self.tcx);
320320
let fail_out_of_bounds = |this: &Self, location| {
321321
this.fail(location, format!("Out of bounds field {:?} for {:?}", f, parent_ty));

compiler/rustc_hir_analysis/src/astconv/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
377377
// `<Foo as Iterator>::Item = String`.
378378
let projection_ty = pred.skip_binder().projection_ty;
379379

380-
let substs_with_infer_self = tcx.mk_substs(
380+
let substs_with_infer_self = tcx.mk_substs_from_iter(
381381
std::iter::once(tcx.mk_ty_var(ty::TyVid::from_u32(0)).into())
382382
.chain(projection_ty.substs.iter().skip(1)),
383383
);

compiler/rustc_hir_analysis/src/astconv/generics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ pub fn create_substs_for_generic_args<'tcx, 'a>(
370370
}
371371
}
372372

373-
tcx.intern_substs(&substs)
373+
tcx.mk_substs(&substs)
374374
}
375375

376376
/// Checks that the correct number of generic arguments have been provided.

compiler/rustc_hir_analysis/src/astconv/mod.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
381381
// here and so associated type bindings will be handled regardless of whether there are any
382382
// non-`Self` generic parameters.
383383
if generics.params.is_empty() {
384-
return (tcx.intern_substs(parent_substs), arg_count);
384+
return (tcx.mk_substs(parent_substs), arg_count);
385385
}
386386

387387
struct SubstsForAstPathCtxt<'a, 'tcx> {
@@ -1529,7 +1529,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15291529
arg
15301530
})
15311531
.collect();
1532-
let substs = tcx.intern_substs(&substs[..]);
1532+
let substs = tcx.mk_substs(&substs);
15331533

15341534
let span = i.bottom().1;
15351535
let empty_generic_args = hir_trait_bounds.iter().any(|hir_bound| {
@@ -1591,7 +1591,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15911591
arg
15921592
})
15931593
.collect();
1594-
b.projection_ty.substs = tcx.intern_substs(&substs[..]);
1594+
b.projection_ty.substs = tcx.mk_substs(&substs);
15951595
}
15961596

15971597
ty::ExistentialProjection::erase_self_ty(tcx, b)
@@ -1613,7 +1613,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
16131613
.collect::<SmallVec<[_; 8]>>();
16141614
v.sort_by(|a, b| a.skip_binder().stable_cmp(tcx, &b.skip_binder()));
16151615
v.dedup();
1616-
let existential_predicates = tcx.intern_poly_existential_predicates(&v);
1616+
let existential_predicates = tcx.mk_poly_existential_predicates(&v);
16171617

16181618
// Use explicitly-specified region bound.
16191619
let region_bound = if !lifetime.is_elided() {
@@ -2810,7 +2810,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
28102810
var: ty::BoundVar::from_u32(index),
28112811
kind: ty::BoundTyKind::Param(def_id, name),
28122812
};
2813-
tcx.mk_ty(ty::Bound(debruijn, br))
2813+
tcx.mk_bound(debruijn, br)
28142814
}
28152815
Some(rbv::ResolvedArg::EarlyBound(_)) => {
28162816
let def_id = def_id.expect_local();
@@ -3020,7 +3020,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
30203020
tcx.mk_ref(r, ty::TypeAndMut { ty: t, mutbl: mt.mutbl })
30213021
}
30223022
hir::TyKind::Never => tcx.types.never,
3023-
hir::TyKind::Tup(fields) => tcx.mk_tup(fields.iter().map(|t| self.ast_ty_to_ty(t))),
3023+
hir::TyKind::Tup(fields) => {
3024+
tcx.mk_tup_from_iter(fields.iter().map(|t| self.ast_ty_to_ty(t)))
3025+
}
30243026
hir::TyKind::BareFn(bf) => {
30253027
require_c_abi_if_c_variadic(tcx, bf.decl, bf.abi, ast_ty.span);
30263028

0 commit comments

Comments
 (0)