11570: minor: Remove misleading comments r=lnicola a=ChayimFriedman2

They're not true anymore after #11375.

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
This commit is contained in:
bors[bot] 2022-02-27 09:17:46 +00:00 committed by GitHub
commit bc2ce4c655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,6 @@ impl<'a> InferenceContext<'a> {
let ty = match &body[tgt_expr] { let ty = match &body[tgt_expr] {
Expr::Missing => self.err_ty(), Expr::Missing => self.err_ty(),
&Expr::If { condition, then_branch, else_branch } => { &Expr::If { condition, then_branch, else_branch } => {
// if let is desugared to match, so this is always simple if
self.infer_expr( self.infer_expr(
condition, condition,
&Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)), &Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)),
@ -184,7 +183,6 @@ impl<'a> InferenceContext<'a> {
coerce: CoerceMany::new(self.err_ty()), coerce: CoerceMany::new(self.err_ty()),
label: label.map(|label| self.body[label].name.clone()), label: label.map(|label| self.body[label].name.clone()),
}); });
// while let is desugared to a match loop, so this is always simple while
self.infer_expr( self.infer_expr(
*condition, *condition,
&Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)), &Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)),