diff options
| author | varkor <github@varkor.com> | 2019-05-13 21:24:00 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-05-28 21:35:20 +0100 |
| commit | 193b748d5fa1f056263be641e42f2b4b1801387d (patch) | |
| tree | 9964ca301ee7eddbdca6b54fb92e9ea0904d4085 | |
| parent | d5c6cb87784ea5c82177beb2662ccdc6c4751388 (diff) | |
| download | rust-193b748d5fa1f056263be641e42f2b4b1801387d.tar.gz rust-193b748d5fa1f056263be641e42f2b4b1801387d.zip | |
Remove FixedArraySize error
| -rw-r--r-- | src/librustc/infer/opaque_types/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/error.rs | 7 | ||||
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/src/librustc/infer/opaque_types/mod.rs b/src/librustc/infer/opaque_types/mod.rs index 3f114595597..220b7b5fa67 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 4e4024d5bab..9bf1dbe2958 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -23,7 +23,6 @@ pub enum TypeError<'tcx> { AbiMismatch(ExpectedFound<abi::Abi>), Mutability, TupleSize(ExpectedFound<usize>), - FixedArraySize(ExpectedFound<u64>), 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 0daa567052d..b0062f20e7f 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), |
