Skip to content

Commit fc86dbd

Browse files
adpaco-awstedinski
authored andcommitted
Conform with recent changes in rustc (limits, binders) (rust-lang#318)
For branch `main-153-2021-07-09`
1 parent 717dfba commit fc86dbd

File tree

1 file changed

+6
-6
lines changed
  • compiler/rustc_codegen_llvm/src/gotoc/monomorphize

1 file changed

+6
-6
lines changed

compiler/rustc_codegen_llvm/src/gotoc/monomorphize/collector.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ pub fn custom_coerce_unsize_info<'tcx>(
3535
) -> CustomCoerceUnsized {
3636
let def_id = tcx.require_lang_item(LangItem::CoerceUnsized, None);
3737

38-
let trait_ref = ty::Binder::bind(
39-
ty::TraitRef { def_id, substs: tcx.mk_substs_trait(source_ty, &[target_ty.into()]) },
40-
tcx,
41-
);
38+
let trait_ref = ty::Binder::dummy(ty::TraitRef {
39+
def_id,
40+
substs: tcx.mk_substs_trait(source_ty, &[target_ty.into()]),
41+
});
4242

4343
match tcx.codegen_fulfill_obligation((ty::ParamEnv::reveal_all(), trait_ref)) {
4444
Ok(traits::ImplSource::UserDefined(traits::ImplSourceUserDefinedData {
@@ -301,7 +301,7 @@ fn check_recursion_limit<'tcx>(
301301
// Code that needs to instantiate the same function recursively
302302
// more than the recursion limit is assumed to be causing an
303303
// infinite expansion.
304-
if !tcx.sess.recursion_limit().value_within_limit(adjusted_recursion_depth) {
304+
if !tcx.recursion_limit().value_within_limit(adjusted_recursion_depth) {
305305
let error = format!("reached the recursion limit while instantiating `{}`", instance);
306306
let mut err = tcx.sess.struct_span_fatal(span, &error);
307307
err.span_note(
@@ -335,7 +335,7 @@ fn check_type_length_limit<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) {
335335
// which means that rustc basically hangs.
336336
//
337337
// Bail out in these cases to avoid that bad user experience.
338-
if !tcx.sess.type_length_limit().value_within_limit(type_length) {
338+
if !tcx.type_length_limit().value_within_limit(type_length) {
339339
// The instance name is already known to be too long for rustc.
340340
// Show only the first and last 32 characters to avoid blasting
341341
// the user's terminal with thousands of lines of type-name.

0 commit comments

Comments
 (0)