about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-05-10 19:55:52 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-05-10 19:55:52 +0200
commitf9cc5a65d24270fac44a7ccf709d7a7efd7b525d (patch)
tree44641f7c9aa9c02fad97915203418e2a216bf05a
parentefd3733f9d33e814629c6d14ddee92d44f62205c (diff)
downloadrust-f9cc5a65d24270fac44a7ccf709d7a7efd7b525d.tar.gz
rust-f9cc5a65d24270fac44a7ccf709d7a7efd7b525d.zip
check_match: add FIXME for removing of hack.
-rw-r--r--src/librustc_typeck/check/_match.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index e8af2f40b87..a69f639e894 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -615,6 +615,8 @@ https://doc.rust-lang.org/reference/types.html#trait-objects");
             //    `if` expression. E.g. given `fn foo() -> &bool;` we reject `if foo() { .. }`.
             //
             // 2. By expecting `bool` for `expr` we get nice diagnostics for e.g. `if x = y { .. }`.
+            //
+            // FIXME(60707): Consider removing hack with principled solution.
             self.check_expr_has_type_or_error(discrim, self.tcx.types.bool)
         } else {
             self.demand_discriminant_type(arms, discrim)