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: redo typo PR by maximevtush #7425

Merged
merged 1 commit into from
Feb 18, 2025
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/noirc_frontend/src/hir/comptime/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ impl<'a> From<&'a InterpreterError> for CustomDiagnostic {
}
InterpreterError::GenericNameShouldBeAnIdent { name, location } => {
let msg =
"Generic name needs to be a valid identifer (one word beginning with a letter)"
"Generic name needs to be a valid identifier (one word beginning with a letter)"
.to_string();
let secondary = format!("`{name}` is not a valid identifier");
CustomDiagnostic::simple_error(msg, secondary, location.span)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// An primary attribute should not be able to be added to a struct defintion
// An primary attribute should not be able to be added to a struct definition
#[oracle(some_oracle)]
struct SomeStruct{
x: Field,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ where
{
// Check that we can call a trait method instead of a trait implementation
// TODO: Need to remove the need for this type annotation
// TODO: Curently, without the annotation we will get `Expression type is ambiguous` when trying to use the `hasher`
// TODO: Currently, without the annotation we will get `Expression type is ambiguous` when trying to use the `hasher`
let mut hasher: H = H::default();
// Regression that the object is converted to a mutable reference type `&mut _`.
// Otherwise will see `Expected type &mut _, found type H`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Tests a very simple program.
//
// The features being tested is basic conditonal on brillig
// The features being tested is basic conditional on brillig
fn main(x: Field) {
// Safety: testing context
unsafe {
Expand Down
4 changes: 2 additions & 2 deletions tooling/lsp/src/requests/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
use super::{process_request, TraitReexport};

mod auto_import;
mod builtins;

Check warning on line 51 in tooling/lsp/src/requests/completion.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (builtins)
mod completion_items;
mod kinds;
mod sort_text;
Expand Down Expand Up @@ -1133,7 +1133,7 @@

/// Try to suggest the name of a module to declare based on which
/// files exist in the filesystem, excluding modules that are already declared.
fn complete_module_delcaration(&mut self, module: &ModuleDeclaration) -> Option<()> {
fn complete_module_declaration(&mut self, module: &ModuleDeclaration) -> Option<()> {
let filename = self.files.get_absolute_name(self.file).ok()?.into_path_buf();

let is_main_lib_or_mod = filename.ends_with("main.nr")
Expand Down Expand Up @@ -1869,7 +1869,7 @@
return;
}

self.complete_module_delcaration(module);
self.complete_module_declaration(module);
}
}

Expand Down Expand Up @@ -1935,8 +1935,8 @@
///
/// For example:
///
/// // "merk" and "ro" match "merkle" and "root" and are in order

Check warning on line 1938 in tooling/lsp/src/requests/completion.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (merk)
/// name_matches("compute_merkle_root", "merk_ro") == true

Check warning on line 1939 in tooling/lsp/src/requests/completion.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (merk)
///
/// // "ro" matches "root", but "merkle" comes before it, so no match
/// name_matches("compute_merkle_root", "ro_mer") == false
Expand Down
2 changes: 1 addition & 1 deletion tooling/lsp/src/requests/completion/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@
#[test]
async fn test_use_first_segment() {
let src = r#"
mod foobaz {}

Check warning on line 137 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (foobaz)
mod foobar {}
use foob>|<

Check warning on line 139 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (foob)
"#;

assert_completion(
src,
vec![module_completion_item("foobaz"), module_completion_item("foobar")],

Check warning on line 144 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (foobaz)
)
.await;
}
Expand Down Expand Up @@ -304,7 +304,7 @@
mod bar {
mod something {}

use super::foob>|<

Check warning on line 307 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (foob)
}
"#;

Expand Down Expand Up @@ -1716,7 +1716,7 @@
#[test]
async fn test_auto_import_suggests_modules_too() {
let src = r#"mod foo {
pub mod barbaz {

Check warning on line 1719 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (barbaz)
fn hello_world() {}
}
}
Expand All @@ -1726,10 +1726,10 @@
}
}"#;

let expected = r#"use foo::barbaz;

Check warning on line 1729 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (barbaz)

mod foo {
pub mod barbaz {

Check warning on line 1732 in tooling/lsp/src/requests/completion/tests.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (barbaz)
fn hello_world() {}
}
}
Expand Down Expand Up @@ -2345,7 +2345,7 @@
}

#[test]
async fn test_auto_import_suggests_private_function_if_visibile() {
async fn test_auto_import_suggests_private_function_if_visible() {
let src = r#"
mod foo {
fn qux() {
Expand Down
Loading