Skip to content

Commit f9cc5a6

Browse files
committed
check_match: add FIXME for removing of hack.
1 parent efd3733 commit f9cc5a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_typeck/check/_match.rs

+2
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ https://doc.rust-lang.org/reference/types.html#trait-objects");
615615
// `if` expression. E.g. given `fn foo() -> &bool;` we reject `if foo() { .. }`.
616616
//
617617
// 2. By expecting `bool` for `expr` we get nice diagnostics for e.g. `if x = y { .. }`.
618+
//
619+
// FIXME(60707): Consider removing hack with principled solution.
618620
self.check_expr_has_type_or_error(discrim, self.tcx.types.bool)
619621
} else {
620622
self.demand_discriminant_type(arms, discrim)

0 commit comments

Comments
 (0)