Skip to content

Commit c8c2bd0

Browse files
committed
Fixed typos in local bindings
1 parent 4702c01 commit c8c2bd0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

crates/hir_ty/src/diagnostics/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ pub fn record_literal_missing_fields(
379379
id: ExprId,
380380
expr: &Expr,
381381
) -> Option<(VariantId, Vec<LocalFieldId>, /*exhaustive*/ bool)> {
382-
let (fields, exhausitve) = match expr {
382+
let (fields, exhaustive) = match expr {
383383
Expr::RecordLit { path: _, fields, spread } => (fields, spread.is_none()),
384384
_ => return None,
385385
};
@@ -400,7 +400,7 @@ pub fn record_literal_missing_fields(
400400
if missed_fields.is_empty() {
401401
return None;
402402
}
403-
Some((variant_def, missed_fields, exhausitve))
403+
Some((variant_def, missed_fields, exhaustive))
404404
}
405405

406406
pub fn record_pattern_missing_fields(

crates/hir_ty/src/lower.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,16 @@ impl Ty {
491491
fn from_hir_path_inner(
492492
ctx: &TyLoweringContext<'_>,
493493
segment: PathSegment<'_>,
494-
typable: TyDefId,
494+
typeable: TyDefId,
495495
infer_args: bool,
496496
) -> Ty {
497-
let generic_def = match typable {
497+
let generic_def = match typeable {
498498
TyDefId::BuiltinType(_) => None,
499499
TyDefId::AdtId(it) => Some(it.into()),
500500
TyDefId::TypeAliasId(it) => Some(it.into()),
501501
};
502502
let substs = substs_from_path_segment(ctx, segment, generic_def, infer_args);
503-
ctx.db.ty(typable).subst(&substs)
503+
ctx.db.ty(typeable).subst(&substs)
504504
}
505505

506506
/// Collect generic arguments from a path into a `Substs`. See also

crates/syntax/src/algo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ pub fn least_common_ancestor(u: &SyntaxNode, v: &SyntaxNode) -> Option<SyntaxNod
8888
let keep = u_depth.min(v_depth);
8989

9090
let u_candidates = u.ancestors().skip(u_depth - keep);
91-
let v_canidates = v.ancestors().skip(v_depth - keep);
92-
let (res, _) = u_candidates.zip(v_canidates).find(|(x, y)| x == y)?;
91+
let v_candidates = v.ancestors().skip(v_depth - keep);
92+
let (res, _) = u_candidates.zip(v_candidates).find(|(x, y)| x == y)?;
9393
Some(res)
9494
}
9595

0 commit comments

Comments
 (0)