|
10 | 10 |
|
11 | 11 | //! See `README.md` for high-level documentation
|
12 | 12 |
|
13 |
| -pub use self::MethodMatchResult::*; |
14 |
| -pub use self::MethodMatchedData::*; |
15 | 13 | use self::SelectionCandidate::*;
|
16 | 14 | use self::EvaluationResult::*;
|
17 | 15 |
|
@@ -110,23 +108,6 @@ pub struct SelectionCache<'tcx> {
|
110 | 108 | SelectionResult<'tcx, SelectionCandidate<'tcx>>>>,
|
111 | 109 | }
|
112 | 110 |
|
113 |
| -pub enum MethodMatchResult { |
114 |
| - MethodMatched(MethodMatchedData), |
115 |
| - MethodAmbiguous(/* list of impls that could apply */ Vec<DefId>), |
116 |
| - MethodDidNotMatch, |
117 |
| -} |
118 |
| - |
119 |
| -#[derive(Copy, Clone, Debug)] |
120 |
| -pub enum MethodMatchedData { |
121 |
| - // In the case of a precise match, we don't really need to store |
122 |
| - // how the match was found. So don't. |
123 |
| - PreciseMethodMatch, |
124 |
| - |
125 |
| - // In the case of a coercion, we need to know the precise impl so |
126 |
| - // that we can determine the type to which things were coerced. |
127 |
| - CoerciveMethodMatch(/* impl we matched */ DefId) |
128 |
| -} |
129 |
| - |
130 | 111 | /// The selection process begins by considering all impls, where
|
131 | 112 | /// clauses, and so forth that might resolve an obligation. Sometimes
|
132 | 113 | /// we'll be able to say definitively that (e.g.) an impl does not
|
@@ -2982,13 +2963,3 @@ impl EvaluationResult {
|
2982 | 2963 | }
|
2983 | 2964 | }
|
2984 | 2965 | }
|
2985 |
| - |
2986 |
| -impl MethodMatchResult { |
2987 |
| - pub fn may_apply(&self) -> bool { |
2988 |
| - match *self { |
2989 |
| - MethodMatched(_) => true, |
2990 |
| - MethodAmbiguous(_) => true, |
2991 |
| - MethodDidNotMatch => false, |
2992 |
| - } |
2993 |
| - } |
2994 |
| -} |
0 commit comments