Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove redundant words and fix some typos in comment #28467

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/passes/src/common/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<N: Node> DiGraph<N> {
// 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<N>, finished: &mut IndexSet<N>) -> Option<N> {
// Add the node to the set of discovered nodes.
discovered.insert(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/symbol_table_creation/creator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/type_checking/check_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_)) {
Expand Down
2 changes: 1 addition & 1 deletion compiler/passes/src/type_checking/check_statements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading