about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-07-27 22:41:15 +0000
committerbors <bors@rust-lang.org>2014-07-27 22:41:15 +0000
commitf4ef36ee4269644ca97907a06c924b5d8be36b89 (patch)
tree381016e942b6362f842f2b3d55628b2d31b21b20 /src
parent79e9f14abf50eecb7d3c53f10ad900615bb2d397 (diff)
parentc6b992a53f6a9f3eee0883640adc270910dc9d87 (diff)
downloadrust-f4ef36ee4269644ca97907a06c924b5d8be36b89.tar.gz
rust-f4ef36ee4269644ca97907a06c924b5d8be36b89.zip
auto merge of #16031 : arielb1/rust/remove_unneeded_fixme, r=kballard
The issue was fixed a month ago - remove the workaround.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/typeck/coherence.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/librustc/middle/typeck/coherence.rs b/src/librustc/middle/typeck/coherence.rs
index dc0f2a9ffff..fdf9125e6e1 100644
--- a/src/librustc/middle/typeck/coherence.rs
+++ b/src/librustc/middle/typeck/coherence.rs
@@ -60,29 +60,25 @@ fn get_base_type(inference_context: &InferCtxt,
                  span: Span,
                  original_type: t)
                  -> Option<t> {
-    let resolved_type;
-    match resolve_type(inference_context,
-                       Some(span),
-                       original_type,
-                       resolve_ivar) {
-        Ok(resulting_type) if !type_is_ty_var(resulting_type) => {
-            resolved_type = resulting_type;
-        }
+    let resolved_type = match resolve_type(inference_context,
+                                           Some(span),
+                                           original_type,
+                                           resolve_ivar) {
+        Ok(resulting_type) if !type_is_ty_var(resulting_type) => resulting_type,
         _ => {
             inference_context.tcx.sess.span_fatal(span,
                                                   "the type of this value must be known in order \
                                                    to determine the base type");
         }
-    }
+    };
 
     match get(resolved_type).sty {
         ty_enum(..) | ty_struct(..) | ty_unboxed_closure(..) => {
             debug!("(getting base type) found base type");
             Some(resolved_type)
         }
-        // FIXME(14865) I would prefere to use `_` here, but that causes a
-        // compiler error.
-        ty_uniq(_) | ty_rptr(_, _) | ty_trait(..) if ty::type_is_trait(resolved_type) => {
+
+        _ if ty::type_is_trait(resolved_type) => {
             debug!("(getting base type) found base type (trait)");
             Some(resolved_type)
         }