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 ++-- crates/hir_ty/src/lower.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty') 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( diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 222f61a11..9594cce8b 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -491,16 +491,16 @@ impl Ty { fn from_hir_path_inner( ctx: &TyLoweringContext<'_>, segment: PathSegment<'_>, - typable: TyDefId, + typeable: TyDefId, infer_args: bool, ) -> Ty { - let generic_def = match typable { + let generic_def = match typeable { TyDefId::BuiltinType(_) => None, TyDefId::AdtId(it) => Some(it.into()), TyDefId::TypeAliasId(it) => Some(it.into()), }; let substs = substs_from_path_segment(ctx, segment, generic_def, infer_args); - ctx.db.ty(typable).subst(&substs) + ctx.db.ty(typeable).subst(&substs) } /// Collect generic arguments from a path into a `Substs`. See also -- cgit v1.2.3