diff --git a/compiler/passes/src/common/graph/mod.rs b/compiler/passes/src/common/graph/mod.rs index 74dcbf2982..a162dd3166 100644 --- a/compiler/passes/src/common/graph/mod.rs +++ b/compiler/passes/src/common/graph/mod.rs @@ -121,7 +121,7 @@ impl DiGraph { // Detects if there is a cycle in the graph starting from the given node, via a recursive depth-first search. // If there is no cycle, returns `None`. // If there is a cycle, returns the node that was most recently discovered. - // Nodes are added to to `finished` in post-order order. + // Nodes are added to `finished` in post-order order. fn contains_cycle_from(&self, node: N, discovered: &mut IndexSet, finished: &mut IndexSet) -> Option { // Add the node to the set of discovered nodes. discovered.insert(node); diff --git a/compiler/passes/src/static_single_assignment/rename_expression.rs b/compiler/passes/src/static_single_assignment/rename_expression.rs index e4614da65a..0c23fce6a9 100644 --- a/compiler/passes/src/static_single_assignment/rename_expression.rs +++ b/compiler/passes/src/static_single_assignment/rename_expression.rs @@ -320,7 +320,7 @@ impl ExpressionConsumer for StaticSingleAssigner<'_> { (Expression::Identifier(place), vec![statement]) } - /// Consumes and returns the locator expression without making any modifciations + /// Consumes and returns the locator expression without making any modifications fn consume_locator(&mut self, input: LocatorExpression) -> Self::Output { (Expression::Locator(input), Vec::new()) } diff --git a/compiler/passes/src/static_single_assignment/rename_statement.rs b/compiler/passes/src/static_single_assignment/rename_statement.rs index 479dec8892..4defd35824 100644 --- a/compiler/passes/src/static_single_assignment/rename_statement.rs +++ b/compiler/passes/src/static_single_assignment/rename_statement.rs @@ -188,7 +188,7 @@ impl StatementConsumer for StaticSingleAssigner<'_> { let if_true = create_phi_argument(&if_table, **symbol); let if_false = create_phi_argument(&else_table, **symbol); - // Create a new node ID for the the phi function. + // Create a new node ID for the phi function. let id = self.node_builder.next_id(); // Update the type of the node ID. let type_ = match self.type_table.get(&if_true.id()) { diff --git a/compiler/passes/src/symbol_table_creation/creator.rs b/compiler/passes/src/symbol_table_creation/creator.rs index 603c28a473..af4b77e8d4 100644 --- a/compiler/passes/src/symbol_table_creation/creator.rs +++ b/compiler/passes/src/symbol_table_creation/creator.rs @@ -116,7 +116,7 @@ impl<'a> ProgramVisitor<'a> for SymbolTableCreator<'a> { fn visit_function_stub(&mut self, input: &'a FunctionStub) { // Construct the location for the function. let location = Location::new(self.program_name, input.name()); - // Initalize the function symbol. + // Initialize the function symbol. if let Err(err) = self.symbol_table.insert_fn(location.clone(), &Function::from(input.clone())) { self.handler.emit_err(err); } diff --git a/compiler/passes/src/type_checking/check_expressions.rs b/compiler/passes/src/type_checking/check_expressions.rs index 488ba84241..44453836fa 100644 --- a/compiler/passes/src/type_checking/check_expressions.rs +++ b/compiler/passes/src/type_checking/check_expressions.rs @@ -667,7 +667,7 @@ impl<'a, N: Network> ExpressionVisitor<'a> for TypeChecker<'a, N> { self.scope_state.is_call = true; let (mut input_futures, mut inferred_finalize_inputs) = (Vec::new(), Vec::new()); for (expected, argument) in func.input.iter().zip(input.arguments.iter()) { - // Get the type of the expression. If the type is not known, do not attempt to attempt any futher inference. + // Get the type of the expression. If the type is not known, do not attempt to attempt any further inference. let ty = self.visit_expression(argument, &Some(expected.type_().clone()))?; // Extract information about futures that are being consumed. if func.variant == Variant::AsyncFunction && matches!(expected.type_(), Type::Future(_)) { diff --git a/compiler/passes/src/type_checking/check_statements.rs b/compiler/passes/src/type_checking/check_statements.rs index 0f46797d37..d60b2ab09e 100644 --- a/compiler/passes/src/type_checking/check_statements.rs +++ b/compiler/passes/src/type_checking/check_statements.rs @@ -85,7 +85,7 @@ impl<'a, N: Network> StatementVisitor<'a> for TypeChecker<'a, N> { } // If the variable exists and its in an async function, then check that it is in the current scope. - // Note that this unwrap is safe because the scope state is initalized before traversing the function. + // Note that this unwrap is safe because the scope state is initialized before traversing the function. if self.scope_state.variant.unwrap().is_async_function() && self.scope_state.is_conditional && self