]> git.lizzy.rs Git - rust.git/commitdiff
remove unused `TypeError::ProjectionBoundsLength`
authorBastian Kauschke <bastian_kauschke@hotmail.de>
Wed, 24 Jun 2020 21:48:41 +0000 (23:48 +0200)
committerBastian Kauschke <bastian_kauschke@hotmail.de>
Tue, 30 Jun 2020 07:13:56 +0000 (09:13 +0200)
src/librustc_middle/ty/error.rs
src/librustc_middle/ty/structural_impls.rs

index 6113359ca93a72787597bd7ce95eb02757779d6c..30ff5a2d9ebdfcd660dbd4c48eee1971204471d5 100644 (file)
@@ -57,7 +57,6 @@ pub enum TypeError<'tcx> {
     /// type).
     CyclicTy(Ty<'tcx>),
     ProjectionMismatched(ExpectedFound<DefId>),
-    ProjectionBoundsLength(ExpectedFound<usize>),
     ExistentialMismatch(ExpectedFound<&'tcx ty::List<ty::ExistentialPredicate<'tcx>>>),
     ObjectUnsafeCoercion(DefId),
     ConstMismatch(ExpectedFound<&'tcx ty::Const<'tcx>>),
@@ -174,13 +173,6 @@ fn report_maybe_different(
                     tcx.def_path_str(values.found)
                 )
             }),
-            ProjectionBoundsLength(ref values) => write!(
-                f,
-                "expected {} associated type binding{}, found {}",
-                values.expected,
-                pluralize!(values.expected),
-                values.found
-            ),
             ExistentialMismatch(ref values) => report_maybe_different(
                 f,
                 &format!("trait `{}`", values.expected),
@@ -216,7 +208,6 @@ pub fn must_include_note(&self) -> bool {
             | RegionsPlaceholderMismatch
             | Traits(_)
             | ProjectionMismatched(_)
-            | ProjectionBoundsLength(_)
             | ExistentialMismatch(_)
             | ConstMismatch(_)
             | IntrinsicCast
index d0d972727bcd8d317810ee57edb05674008131b4..1d3607fe32ffce570cba672a64bcf87ff6b28910 100644 (file)
@@ -655,7 +655,6 @@ fn lift_to_tcx(&self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
             VariadicMismatch(x) => VariadicMismatch(x),
             CyclicTy(t) => return tcx.lift(&t).map(|t| CyclicTy(t)),
             ProjectionMismatched(x) => ProjectionMismatched(x),
-            ProjectionBoundsLength(x) => ProjectionBoundsLength(x),
             Sorts(ref x) => return tcx.lift(x).map(Sorts),
             ExistentialMismatch(ref x) => return tcx.lift(x).map(ExistentialMismatch),
             ConstMismatch(ref x) => return tcx.lift(x).map(ConstMismatch),