diff --git a/src/librustc/infer/opaque_types/mod.rs b/src/librustc/infer/opaque_types/mod.rs index 3f114595597f..220b7b5fa67f 100644 --- a/src/librustc/infer/opaque_types/mod.rs +++ b/src/librustc/infer/opaque_types/mod.rs @@ -284,6 +284,8 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { debug!("constrain_opaque_type: def_id={:?}", def_id); debug!("constrain_opaque_type: opaque_defn={:#?}", opaque_defn); + let tcx = self.tcx; + let concrete_ty = self.resolve_vars_if_possible(&opaque_defn.concrete_ty); debug!("constrain_opaque_type: concrete_ty={:?}", concrete_ty); diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index 4e4024d5bab4..9bf1dbe29588 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -23,7 +23,6 @@ pub enum TypeError<'tcx> { AbiMismatch(ExpectedFound), Mutability, TupleSize(ExpectedFound), - FixedArraySize(ExpectedFound), ArgCount, RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>), @@ -94,12 +93,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> { values.found) } Mutability => write!(f, "types differ in mutability"), - FixedArraySize(values) => { - write!(f, "expected an array with a fixed size of {} elements, \ - found one with {} elements", - values.expected, - values.found) - } TupleSize(values) => { write!(f, "expected a tuple with {} elements, \ found one with {} elements", diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 0daa567052d5..b0062f20e7f6 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -716,7 +716,6 @@ impl<'a, 'tcx> Lift<'tcx> for ty::error::TypeError<'a> { AbiMismatch(x) => AbiMismatch(x), Mutability => Mutability, TupleSize(x) => TupleSize(x), - FixedArraySize(x) => FixedArraySize(x), ArgCount => ArgCount, RegionsDoesNotOutlive(a, b) => { return tcx.lift(&(a, b)).map(|(a, b)| RegionsDoesNotOutlive(a, b)) @@ -1295,7 +1294,6 @@ EnumTypeFoldableImpl! { (ty::error::TypeError::AbiMismatch)(x), (ty::error::TypeError::Mutability), (ty::error::TypeError::TupleSize)(x), - (ty::error::TypeError::FixedArraySize)(x), (ty::error::TypeError::ArgCount), (ty::error::TypeError::RegionsDoesNotOutlive)(a, b), (ty::error::TypeError::RegionsInsufficientlyPolymorphic)(a, b),