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_def/src/body/lower.rs | 4 ++-- crates/hir_def/src/expr.rs | 2 +- crates/hir_def/src/nameres/collector.rs | 8 ++++---- crates/hir_def/src/resolver.rs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 6be1eaade..3dc33f248 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs @@ -581,7 +581,7 @@ impl ExprCollector<'_> { match res.value { Some((mark, expansion)) => { // FIXME: Statements are too complicated to recover from error for now. - // It is because we don't have any hygenine for local variable expansion right now. + // It is because we don't have any hygiene for local variable expansion right now. if T::can_cast(syntax::SyntaxKind::MACRO_STMTS) && res.err.is_some() { self.expander.exit(self.db, mark); collector(self, None); @@ -959,7 +959,7 @@ impl ExprCollector<'_> { fn collect_tuple_pat(&mut self, args: AstChildren) -> (Vec, Option) { // Find the location of the `..`, if there is one. Note that we do not - // consider the possiblity of there being multiple `..` here. + // consider the possibility of there being multiple `..` here. let ellipsis = args.clone().position(|p| matches!(p, ast::Pat::RestPat(_))); // We want to skip the `..` pattern here, since we account for it above. let args = args diff --git a/crates/hir_def/src/expr.rs b/crates/hir_def/src/expr.rs index 6a481769d..76f5721e5 100644 --- a/crates/hir_def/src/expr.rs +++ b/crates/hir_def/src/expr.rs @@ -1,6 +1,6 @@ //! This module describes hir-level representation of expressions. //! -//! This representaion is: +//! This representation is: //! //! 1. Identity-based. Each expression has an `id`, so we can distinguish //! between different `1` in `1 + 1`. diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index 77017e4ea..f027fd48d 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -267,7 +267,7 @@ impl DefCollector<'_> { // Resolve all indeterminate resolved imports again // As some of the macros will expand newly import shadowing partial resolved imports - // FIXME: We maybe could skip this, if we handle the Indetermine imports in `resolve_imports` + // FIXME: We maybe could skip this, if we handle the indeterminate imports in `resolve_imports` // correctly let partial_resolved = self.resolved_imports.iter().filter_map(|directive| { if let PartialResolvedImport::Indeterminate(_) = directive.status { @@ -402,7 +402,7 @@ impl DefCollector<'_> { /// Define a proc macro /// - /// A proc macro is similar to normal macro scope, but it would not visiable in legacy textual scoped. + /// A proc macro is similar to normal macro scope, but it would not visible in legacy textual scoped. /// And unconditionally exported. fn define_proc_macro(&mut self, name: Name, macro_: MacroDefId) { self.update( @@ -592,7 +592,7 @@ impl DefCollector<'_> { // XXX: urgh, so this works by accident! Here, we look at // the enum data, and, in theory, this might require us to // look back at the crate_def_map, creating a cycle. For - // example, `enum E { crate::some_macro!(); }`. Luckely, the + // example, `enum E { crate::some_macro!(); }`. Luckily, the // only kind of macro that is allowed inside enum is a // `cfg_macro`, and we don't need to run name resolution for // it, but this is sheer luck! @@ -655,7 +655,7 @@ impl DefCollector<'_> { &mut self, module_id: LocalModuleId, resolutions: &[(Option, PerNs)], - // All resolutions are imported with this visibility; the visibilies in + // All resolutions are imported with this visibility; the visibilities in // the `PerNs` values are ignored and overwritten vis: Visibility, import_type: ImportType, diff --git a/crates/hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs index 129f1dbac..e4152a0be 100644 --- a/crates/hir_def/src/resolver.rs +++ b/crates/hir_def/src/resolver.rs @@ -27,7 +27,7 @@ use crate::{ #[derive(Debug, Clone, Default)] pub struct Resolver { - // FIXME: all usages generally call `.rev`, so maybe reverse once in consturciton? + // FIXME: all usages generally call `.rev`, so maybe reverse once in construction? scopes: Vec, } -- cgit v1.2.3