about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-15 22:15:53 +0000
committerbors <bors@rust-lang.org>2017-04-15 22:15:53 +0000
commit13fd5e93deb41045c4de88c257d2b02ada2b1730 (patch)
treeaddefe47e2920935f8dbecdb8ffcd567f78b1f32 /src
parentd5cf1cb64cd1948a8c289e29838716f03d49d5aa (diff)
parentf8f5282e5c45db26ae4b4bed11b342dcb399b037 (diff)
downloadrust-13fd5e93deb41045c4de88c257d2b02ada2b1730.tar.gz
rust-13fd5e93deb41045c4de88c257d2b02ada2b1730.zip
Auto merge of #41320 - Mark-Simulacrum:cleanup-methodmatch, r=arielb1
Remove MethodMatchResult and MethodMatchedData.

These two enums were unused.

Fixes #41318.

r? @nikomatsakis
Diffstat (limited to 'src')
-rw-r--r--src/librustc/traits/mod.rs2
-rw-r--r--src/librustc/traits/select.rs29
2 files changed, 0 insertions, 31 deletions
diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs
index ea243d65881..0ff379b30ff 100644
--- a/src/librustc/traits/mod.rs
+++ b/src/librustc/traits/mod.rs
@@ -38,8 +38,6 @@ pub use self::project::{ProjectionCache, ProjectionCacheSnapshot, Reveal};
 pub use self::object_safety::ObjectSafetyViolation;
 pub use self::object_safety::MethodViolationCode;
 pub use self::select::{EvaluationCache, SelectionContext, SelectionCache};
-pub use self::select::{MethodMatchResult, MethodMatched, MethodAmbiguous, MethodDidNotMatch};
-pub use self::select::{MethodMatchedData}; // intentionally don't export variants
 pub use self::specialize::{OverlapError, specialization_graph, specializes, translate_substs};
 pub use self::specialize::{SpecializesCache, find_associated_item};
 pub use self::util::elaborate_predicates;
diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs
index 410eb2b8484..70ddcff5181 100644
--- a/src/librustc/traits/select.rs
+++ b/src/librustc/traits/select.rs
@@ -10,8 +10,6 @@
 
 //! See `README.md` for high-level documentation
 
-pub use self::MethodMatchResult::*;
-pub use self::MethodMatchedData::*;
 use self::SelectionCandidate::*;
 use self::EvaluationResult::*;
 
@@ -110,23 +108,6 @@ pub struct SelectionCache<'tcx> {
                                SelectionResult<'tcx, SelectionCandidate<'tcx>>>>,
 }
 
-pub enum MethodMatchResult {
-    MethodMatched(MethodMatchedData),
-    MethodAmbiguous(/* list of impls that could apply */ Vec<DefId>),
-    MethodDidNotMatch,
-}
-
-#[derive(Copy, Clone, Debug)]
-pub enum MethodMatchedData {
-    // In the case of a precise match, we don't really need to store
-    // how the match was found. So don't.
-    PreciseMethodMatch,
-
-    // In the case of a coercion, we need to know the precise impl so
-    // that we can determine the type to which things were coerced.
-    CoerciveMethodMatch(/* impl we matched */ DefId)
-}
-
 /// The selection process begins by considering all impls, where
 /// clauses, and so forth that might resolve an obligation.  Sometimes
 /// we'll be able to say definitively that (e.g.) an impl does not
@@ -2982,13 +2963,3 @@ impl EvaluationResult {
         }
     }
 }
-
-impl MethodMatchResult {
-    pub fn may_apply(&self) -> bool {
-        match *self {
-            MethodMatched(_) => true,
-            MethodAmbiguous(_) => true,
-            MethodDidNotMatch => false,
-        }
-    }
-}