From 21f8239ac8be6093967bc91ec155782d37efcb6a Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Fri, 8 Jan 2021 15:46:48 +0100 Subject: Fixed typos in code comments --- crates/hir_ty/src/diagnostics/match_check.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/diagnostics') diff --git a/crates/hir_ty/src/diagnostics/match_check.rs b/crates/hir_ty/src/diagnostics/match_check.rs index 62c329731..61c47eec8 100644 --- a/crates/hir_ty/src/diagnostics/match_check.rs +++ b/crates/hir_ty/src/diagnostics/match_check.rs @@ -14,7 +14,7 @@ //! The algorithm implemented here is a modified version of the one described in //! . //! However, to save future implementors from reading the original paper, we -//! summarise the algorithm here to hopefully save time and be a little clearer +//! summarize the algorithm here to hopefully save time and be a little clearer //! (without being so rigorous). //! //! The core of the algorithm revolves about a "usefulness" check. In particular, we @@ -132,7 +132,7 @@ //! The algorithm is inductive (on the number of columns: i.e., components of tuple patterns). //! That means we're going to check the components from left-to-right, so the algorithm //! operates principally on the first component of the matrix and new pattern-stack `p`. -//! This algorithm is realised in the `is_useful` function. +//! This algorithm is realized in the `is_useful` function. //! //! Base case (`n = 0`, i.e., an empty tuple pattern): //! - If `P` already contains an empty pattern (i.e., if the number of patterns `m > 0`), then -- cgit v1.2.3 From c8c2bd097a8cb47b3105d32d9d22c6f2c7fbd590 Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Fri, 8 Jan 2021 15:41:32 +0100 Subject: Fixed typos in local bindings --- crates/hir_ty/src/diagnostics/expr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/diagnostics') diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs index a1c484fdf..107417c27 100644 --- a/crates/hir_ty/src/diagnostics/expr.rs +++ b/crates/hir_ty/src/diagnostics/expr.rs @@ -379,7 +379,7 @@ pub fn record_literal_missing_fields( id: ExprId, expr: &Expr, ) -> Option<(VariantId, Vec, /*exhaustive*/ bool)> { - let (fields, exhausitve) = match expr { + let (fields, exhaustive) = match expr { Expr::RecordLit { path: _, fields, spread } => (fields, spread.is_none()), _ => return None, }; @@ -400,7 +400,7 @@ pub fn record_literal_missing_fields( if missed_fields.is_empty() { return None; } - Some((variant_def, missed_fields, exhausitve)) + Some((variant_def, missed_fields, exhaustive)) } pub fn record_pattern_missing_fields( -- cgit v1.2.3