about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2022-02-27 09:52:11 +0200
committerGitHub <noreply@github.com>2022-02-27 09:52:11 +0200
commit744f0ea2e74fd3df6b83a07e6eb2bc2994af4a23 (patch)
treecdadd4294438cff78c405c4b743104c844dc39fe
parentb86baa709282a07e6678744a31b0d18e51a60504 (diff)
downloadrust-744f0ea2e74fd3df6b83a07e6eb2bc2994af4a23.tar.gz
rust-744f0ea2e74fd3df6b83a07e6eb2bc2994af4a23.zip
Remove misleading comments
They're not true anymore after #11375.
-rw-r--r--crates/hir_ty/src/infer/expr.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index c305af2e912..ad54b72b4b5 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -84,7 +84,6 @@ impl<'a> InferenceContext<'a> {
         let ty = match &body[tgt_expr] {
             Expr::Missing => self.err_ty(),
             &Expr::If { condition, then_branch, else_branch } => {
-                // if let is desugared to match, so this is always simple if
                 self.infer_expr(
                     condition,
                     &Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)),
@@ -184,7 +183,6 @@ impl<'a> InferenceContext<'a> {
                     coerce: CoerceMany::new(self.err_ty()),
                     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(
                     *condition,
                     &Expectation::has_type(TyKind::Scalar(Scalar::Bool).intern(Interner)),