Merge pull request #20822 from Young-Flash/update_typos_checker
minor: update typos checker version
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 0eb57a6..e3384c9 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -293,7 +293,7 @@
timeout-minutes: 10
env:
FORCE_COLOR: 1
- TYPOS_VERSION: v1.28.3
+ TYPOS_VERSION: v1.38.1
steps:
- name: download typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
diff --git a/.typos.toml b/.typos.toml
index cdbc003..9946415 100644
--- a/.typos.toml
+++ b/.typos.toml
@@ -32,6 +32,7 @@
trivias = "trivias"
thir = "thir"
jod = "jod"
+tructure = "tructure"
[default.extend-identifiers]
anc = "anc"
diff --git a/crates/hir-ty/src/layout/target.rs b/crates/hir-ty/src/layout/target.rs
index 8a7d93d..b0986c4 100644
--- a/crates/hir-ty/src/layout/target.rs
+++ b/crates/hir-ty/src/layout/target.rs
@@ -39,7 +39,7 @@
target,
} => format!(r#"inconsistent target specification: "data-layout" claims pointers are {pointer_size}-bit, while "target-pointer-width" is `{target}`"#),
TargetDataLayoutErrors::InvalidBitsSize { err } => err,
- TargetDataLayoutErrors::UnknownPointerSpecification { err } => format!(r#"use of unknown pointer specifer in "data-layout": {err}"#),
+ TargetDataLayoutErrors::UnknownPointerSpecification { err } => format!(r#"use of unknown pointer specifier in "data-layout": {err}"#),
}.into())
}
},
diff --git a/crates/ide-assists/src/assist_config.rs b/crates/ide-assists/src/assist_config.rs
index 597d035..7d5070a 100644
--- a/crates/ide-assists/src/assist_config.rs
+++ b/crates/ide-assists/src/assist_config.rs
@@ -38,7 +38,7 @@
}
}
- pub fn find_path_confg(&self, allow_unstable: bool) -> FindPathConfig {
+ pub fn find_path_config(&self, allow_unstable: bool) -> FindPathConfig {
FindPathConfig {
prefer_no_std: self.prefer_no_std,
prefer_prelude: self.prefer_prelude,
diff --git a/crates/ide-assists/src/handlers/add_missing_match_arms.rs b/crates/ide-assists/src/handlers/add_missing_match_arms.rs
index 3910921..8802a54 100644
--- a/crates/ide-assists/src/handlers/add_missing_match_arms.rs
+++ b/crates/ide-assists/src/handlers/add_missing_match_arms.rs
@@ -80,7 +80,7 @@
let scope = ctx.sema.scope(expr.syntax())?;
let module = scope.module();
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(scope.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(scope.krate()));
let self_ty = if ctx.config.prefer_self_ty {
scope
.containing_function()
diff --git a/crates/ide-assists/src/handlers/convert_bool_to_enum.rs b/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
index 8044557..2ad1336 100644
--- a/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
+++ b/crates/ide-assists/src/handlers/convert_bool_to_enum.rs
@@ -346,7 +346,7 @@
ImportScope::find_insert_use_container(name.syntax(), &ctx.sema).and_then(
|import_scope| {
let cfg =
- ctx.config.find_path_confg(ctx.sema.is_nightly(target_module.krate()));
+ ctx.config.find_path_config(ctx.sema.is_nightly(target_module.krate()));
let path = ref_module
.find_use_path(
ctx.sema.db,
diff --git a/crates/ide-assists/src/handlers/convert_into_to_from.rs b/crates/ide-assists/src/handlers/convert_into_to_from.rs
index 3a464a3..8f02d28 100644
--- a/crates/ide-assists/src/handlers/convert_into_to_from.rs
+++ b/crates/ide-assists/src/handlers/convert_into_to_from.rs
@@ -43,7 +43,7 @@
return None;
}
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let src_type_path = {
let src_type_path = src_type.syntax().descendants().find_map(ast::Path::cast)?;
diff --git a/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs b/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs
index 80ffb4d..9876e14 100644
--- a/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs
+++ b/crates/ide-assists/src/handlers/convert_tuple_return_type_to_struct.rs
@@ -199,7 +199,7 @@
{
visited_modules.insert(ref_module);
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(ref_module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(ref_module.krate()));
let import_scope =
ImportScope::find_insert_use_container(new_name.syntax(), &ctx.sema);
let path = ref_module
diff --git a/crates/ide-assists/src/handlers/destructure_struct_binding.rs b/crates/ide-assists/src/handlers/destructure_struct_binding.rs
index 27755db..8b24d33 100644
--- a/crates/ide-assists/src/handlers/destructure_struct_binding.rs
+++ b/crates/ide-assists/src/handlers/destructure_struct_binding.rs
@@ -88,7 +88,7 @@
let hir::Adt::Struct(struct_type) = ty.strip_references().as_adt()? else { return None };
let module = ctx.sema.scope(ident_pat.syntax())?.module();
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let struct_def = hir::ModuleDef::from(struct_type);
let kind = struct_type.kind(ctx.db());
let struct_def_path = module.find_path(ctx.db(), struct_def, cfg)?;
diff --git a/crates/ide-assists/src/handlers/extract_function.rs b/crates/ide-assists/src/handlers/extract_function.rs
index 90a5139..9a9adf2 100644
--- a/crates/ide-assists/src/handlers/extract_function.rs
+++ b/crates/ide-assists/src/handlers/extract_function.rs
@@ -209,7 +209,7 @@
FamousDefs(&ctx.sema, module.krate()).core_ops_ControlFlow();
if let Some(control_flow_enum) = control_flow_enum {
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let mod_path = module.find_use_path(
ctx.sema.db,
ModuleDef::from(control_flow_enum),
diff --git a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
index 20ebd8f..2cec329 100644
--- a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
+++ b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -400,7 +400,7 @@
let segment = builder.make_mut(segment);
let scope_node = builder.make_syntax_mut(scope_node);
if !visited_modules.contains(&module) {
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let mod_path = module.find_use_path(
ctx.sema.db,
*enum_module_def,
diff --git a/crates/ide-assists/src/handlers/generate_deref.rs b/crates/ide-assists/src/handlers/generate_deref.rs
index a1fc2c6..b02e3e4 100644
--- a/crates/ide-assists/src/handlers/generate_deref.rs
+++ b/crates/ide-assists/src/handlers/generate_deref.rs
@@ -57,7 +57,7 @@
};
let module = ctx.sema.to_def(&strukt)?.module(ctx.db());
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let trait_ = deref_type_to_generate.to_trait(&ctx.sema, module.krate())?;
let trait_path = module.find_path(ctx.db(), ModuleDef::Trait(trait_), cfg)?;
@@ -99,7 +99,7 @@
};
let module = ctx.sema.to_def(&strukt)?.module(ctx.db());
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let trait_ = deref_type_to_generate.to_trait(&ctx.sema, module.krate())?;
let trait_path = module.find_path(ctx.db(), ModuleDef::Trait(trait_), cfg)?;
diff --git a/crates/ide-assists/src/handlers/generate_new.rs b/crates/ide-assists/src/handlers/generate_new.rs
index 9760fd6..cd968b9 100644
--- a/crates/ide-assists/src/handlers/generate_new.rs
+++ b/crates/ide-assists/src/handlers/generate_new.rs
@@ -77,7 +77,7 @@
let item_in_ns = hir::ItemInNs::from(hir::ModuleDef::from(ty.as_adt()?));
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(current_module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(current_module.krate()));
let type_path = current_module.find_path(
ctx.sema.db,
item_for_path_search(ctx.sema.db, item_in_ns)?,
diff --git a/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs b/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
index cad14d9..6c302a2 100644
--- a/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
+++ b/crates/ide-assists/src/handlers/generate_single_field_struct_from.rs
@@ -169,7 +169,7 @@
types: &[ast::Type],
) -> Vec<Option<ast::Expr>> {
let (db, sema) = (ctx.db(), &ctx.sema);
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
types
.iter()
.map(|ty| {
diff --git a/crates/ide-assists/src/handlers/qualify_method_call.rs b/crates/ide-assists/src/handlers/qualify_method_call.rs
index e4494f0..d8dbefd 100644
--- a/crates/ide-assists/src/handlers/qualify_method_call.rs
+++ b/crates/ide-assists/src/handlers/qualify_method_call.rs
@@ -45,7 +45,7 @@
let current_edition = current_module.krate().edition(ctx.db());
let target_module_def = ModuleDef::from(resolved_call);
let item_in_ns = ItemInNs::from(target_module_def);
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(current_module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(current_module.krate()));
let receiver_path = current_module.find_path(
ctx.sema.db,
item_for_path_search(ctx.sema.db, item_in_ns)?,
diff --git a/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs b/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
index 25c5593..2bf4406 100644
--- a/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
+++ b/crates/ide-assists/src/handlers/replace_derive_with_manual_impl.rs
@@ -71,7 +71,7 @@
let current_module = ctx.sema.scope(adt.syntax())?.module();
let current_crate = current_module.krate();
let current_edition = current_crate.edition(ctx.db());
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(current_crate));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(current_crate));
let found_traits = items_locator::items_with_name(
ctx.db(),
diff --git a/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs
index 5fc4d7a..f6526cd 100644
--- a/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs
+++ b/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs
@@ -64,7 +64,7 @@
let path_to_qualifier = starts_with_name_ref
.then(|| {
let mod_ = ctx.sema.scope(original_path.syntax())?.module();
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(mod_.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(mod_.krate()));
mod_.find_use_path(ctx.sema.db, module, ctx.config.insert_use.prefix_kind, cfg)
})
.flatten();
diff --git a/crates/ide-assists/src/handlers/term_search.rs b/crates/ide-assists/src/handlers/term_search.rs
index 209d3f0..d64a76e 100644
--- a/crates/ide-assists/src/handlers/term_search.rs
+++ b/crates/ide-assists/src/handlers/term_search.rs
@@ -55,7 +55,7 @@
path.gen_source_code(
&scope,
&mut formatter,
- ctx.config.find_path_confg(ctx.sema.is_nightly(scope.module().krate())),
+ ctx.config.find_path_config(ctx.sema.is_nightly(scope.module().krate())),
scope.krate().to_display_target(ctx.db()),
)
.ok()
diff --git a/crates/ide-assists/src/handlers/toggle_async_sugar.rs b/crates/ide-assists/src/handlers/toggle_async_sugar.rs
index aed66d3..fa6fca8 100644
--- a/crates/ide-assists/src/handlers/toggle_async_sugar.rs
+++ b/crates/ide-assists/src/handlers/toggle_async_sugar.rs
@@ -132,7 +132,7 @@
let scope = ctx.sema.scope(function.syntax())?;
let module = scope.module();
- let cfg = ctx.config.find_path_confg(ctx.sema.is_nightly(module.krate()));
+ let cfg = ctx.config.find_path_config(ctx.sema.is_nightly(module.krate()));
let future_trait = FamousDefs(&ctx.sema, scope.krate()).core_future_Future()?;
let trait_path = module.find_path(ctx.db(), ModuleDef::Trait(future_trait), cfg)?;
let edition = scope.krate().edition(ctx.db());
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index 079dedd..0da9ee0 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -116,7 +116,7 @@
// |arithmetic| Emitted for the arithmetic operators `+`, `-`, `*`, `/`, `+=`, `-=`, `*=`, `/=`.|
// |bitwise| Emitted for the bitwise operators `|`, `&`, `!`, `^`, `|=`, `&=`, `^=`.|
// |comparison| Emitted for the comparison oerators `>`, `<`, `==`, `>=`, `<=`, `!=`.|
-// |logical| Emitted for the logical operatos `||`, `&&`, `!`.|
+// |logical| Emitted for the logical operators `||`, `&&`, `!`.|
//
// - For punctuation:
//