diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 7a554605232..433f6685d1f 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -3229,7 +3229,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { Some(ret) => ret, None => return Vec::new() }; - let expect_args = self.fudge_inference_if_ok(&RegionVariableOrigin::Coercion(call_span), || { + let origin = RegionVariableOrigin::Coercion(call_span); + let expect_args = self.fudge_inference_if_ok(&origin, || { // Attempt to apply a subtyping relationship between the formal // return type (likely containing type variables if the function // is polymorphic) and the expected return type.