diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 1755382516a..4f733b8f68a 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -654,7 +654,7 @@ impl Binder { /// contain any bound regions that would be bound by the /// binder. This is commonly used to 'inject' a value T into a /// different binding level. - pub fn new_not_binding<'tcx>(value: T) -> Binder + pub fn dummy<'tcx>(value: T) -> Binder where T: TypeFoldable<'tcx> { assert!(!value.has_escaping_regions()); diff --git a/src/librustc_mir/borrow_check/nll/universal_regions.rs b/src/librustc_mir/borrow_check/nll/universal_regions.rs index b614e280c55..857a620cead 100644 --- a/src/librustc_mir/borrow_check/nll/universal_regions.rs +++ b/src/librustc_mir/borrow_check/nll/universal_regions.rs @@ -545,7 +545,7 @@ impl<'cx, 'gcx, 'tcx> UniversalRegionsBuilder<'cx, 'gcx, 'tcx> { assert_eq!(self.mir_def_id, def_id); let output = substs.generator_return_ty(def_id, tcx); let inputs_and_output = self.infcx.tcx.intern_type_list(&[defining_ty, output]); - ty::Binder::new_not_binding(inputs_and_output) + ty::Binder::dummy(inputs_and_output) } ty::TyFnDef(def_id, _) => {