diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2016-09-20 02:21:48 +0200 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2016-09-28 22:30:30 +0200 |
| commit | 69c3d0add4a35d0a643cbdec2d91fc28808618b0 (patch) | |
| tree | 8a601e6e2024a5b707c31e4bbeb191f9b908806b | |
| parent | dcc8d578a0287093a816605408c8893df9cf1de7 (diff) | |
| download | rust-69c3d0add4a35d0a643cbdec2d91fc28808618b0.tar.gz rust-69c3d0add4a35d0a643cbdec2d91fc28808618b0.zip | |
Remove unused `TypeError` variants
These weren't flagged by the lint because they were still technically created somewhere... if you created them before, somehow.
| -rw-r--r-- | src/librustc/ty/error.rs | 27 | ||||
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 7 |
2 files changed, 0 insertions, 34 deletions
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index 001f47af68c..9b345c2d023 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -33,13 +33,8 @@ pub enum TypeError<'tcx> { UnsafetyMismatch(ExpectedFound<hir::Unsafety>), AbiMismatch(ExpectedFound<abi::Abi>), Mutability, - BoxMutability, - PtrMutability, - RefMutability, - VecMutability, TupleSize(ExpectedFound<usize>), FixedArraySize(ExpectedFound<usize>), - TyParamSize(ExpectedFound<usize>), ArgCount, RegionsDoesNotOutlive(&'tcx Region, &'tcx Region), RegionsNotSame(&'tcx Region, &'tcx Region), @@ -47,14 +42,12 @@ pub enum TypeError<'tcx> { RegionsInsufficientlyPolymorphic(BoundRegion, &'tcx Region), RegionsOverlyPolymorphic(BoundRegion, &'tcx Region), Sorts(ExpectedFound<Ty<'tcx>>), - IntegerAsChar, IntMismatch(ExpectedFound<ty::IntVarValue>), FloatMismatch(ExpectedFound<ast::FloatTy>), Traits(ExpectedFound<DefId>), BuiltinBoundsMismatch(ExpectedFound<ty::BuiltinBounds>), VariadicMismatch(ExpectedFound<bool>), CyclicTy, - ConvergenceMismatch(ExpectedFound<bool>), ProjectionNameMismatched(ExpectedFound<Name>), ProjectionBoundsLength(ExpectedFound<usize>), TyParamDefaultMismatch(ExpectedFound<type_variable::Default<'tcx>>) @@ -99,18 +92,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> { values.found) } Mutability => write!(f, "types differ in mutability"), - BoxMutability => { - write!(f, "boxed types differ in mutability") - } - VecMutability => write!(f, "vectors differ in mutability"), - PtrMutability => write!(f, "pointers differ in mutability"), - RefMutability => write!(f, "references differ in mutability"), - TyParamSize(values) => { - write!(f, "expected a type with {} type params, \ - found one with {} type params", - values.expected, - values.found) - } FixedArraySize(values) => { write!(f, "expected an array with a fixed size of {} elements, \ found one with {} elements", @@ -167,9 +148,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> { values.found) } } - IntegerAsChar => { - write!(f, "expected an integral type, found `char`") - } IntMismatch(ref values) => { write!(f, "expected `{:?}`, found `{:?}`", values.expected, @@ -185,11 +163,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> { if values.expected { "variadic" } else { "non-variadic" }, if values.found { "variadic" } else { "non-variadic" }) } - ConvergenceMismatch(ref values) => { - write!(f, "expected {} fn, found {} function", - if values.expected { "converging" } else { "diverging" }, - if values.found { "converging" } else { "diverging" }) - } ProjectionNameMismatched(ref values) => { write!(f, "expected {}, found {}", values.expected, diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index 5a87ea1473d..abd5cb51f39 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -296,13 +296,8 @@ impl<'a, 'tcx> Lift<'tcx> for ty::error::TypeError<'a> { UnsafetyMismatch(x) => UnsafetyMismatch(x), AbiMismatch(x) => AbiMismatch(x), Mutability => Mutability, - BoxMutability => BoxMutability, - PtrMutability => PtrMutability, - RefMutability => RefMutability, - VecMutability => VecMutability, TupleSize(x) => TupleSize(x), FixedArraySize(x) => FixedArraySize(x), - TyParamSize(x) => TyParamSize(x), ArgCount => ArgCount, RegionsDoesNotOutlive(a, b) => { return tcx.lift(&(a, b)).map(|(a, b)| RegionsDoesNotOutlive(a, b)) @@ -319,14 +314,12 @@ impl<'a, 'tcx> Lift<'tcx> for ty::error::TypeError<'a> { RegionsOverlyPolymorphic(a, b) => { return tcx.lift(&b).map(|b| RegionsOverlyPolymorphic(a, b)) } - IntegerAsChar => IntegerAsChar, IntMismatch(x) => IntMismatch(x), FloatMismatch(x) => FloatMismatch(x), Traits(x) => Traits(x), BuiltinBoundsMismatch(x) => BuiltinBoundsMismatch(x), VariadicMismatch(x) => VariadicMismatch(x), CyclicTy => CyclicTy, - ConvergenceMismatch(x) => ConvergenceMismatch(x), ProjectionNameMismatched(x) => ProjectionNameMismatched(x), ProjectionBoundsLength(x) => ProjectionBoundsLength(x), |
