Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 82ff740

Browse files
committed
Auto merge of rust-lang#13044 - dzvon:fix-typo, r=Veykril
fix: a bunch of typos This PR will fix some typos detected by [typos]. There are also some other typos in the function names, variable names, and file names, which I leave as they are. I'm more certain that typos in comments should be fixed. [typos]: https://github.com/crate-ci/typos
2 parents d6412b5 + 2374741 commit 82ff740

File tree

19 files changed

+23
-23
lines changed

19 files changed

+23
-23
lines changed

crates/flycheck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ impl CargoActor {
345345
//
346346
// Because cargo only outputs one JSON object per line, we can
347347
// simply skip a line if it doesn't parse, which just ignores any
348-
// erroneus output.
348+
// erroneous output.
349349

350350
let mut error = String::new();
351351
let mut read_at_least_one_message = false;

crates/hir-def/src/nameres/proc_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Attrs {
4545
kind: ProcMacroKind::CustomDerive { helpers: Box::new([]) },
4646
}),
4747

48-
// `#[proc_macro_derive(Trait, attibutes(helper1, helper2, ...))]`
48+
// `#[proc_macro_derive(Trait, attributes(helper1, helper2, ...))]`
4949
[
5050
TokenTree::Leaf(Leaf::Ident(trait_name)),
5151
TokenTree::Leaf(Leaf::Punct(comma)),

crates/hir-expand/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ impl ExpansionInfo {
616616

617617
let token_id = match token_id_in_attr_input {
618618
Some(token_id) => token_id,
619-
// the token is not inside an attribute's input so do the lookup in the macro_arg as ususal
619+
// the token is not inside an attribute's input so do the lookup in the macro_arg as usual
620620
None => {
621621
let relative_range =
622622
token.value.text_range().checked_sub(self.arg.value.text_range().start())?;

crates/ide-assists/src/handlers/extract_module.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use super::remove_unused_param::range_to_remove;
2929

3030
// Assist: extract_module
3131
//
32-
// Extracts a selected region as seperate module. All the references, visibility and imports are
32+
// Extracts a selected region as separate module. All the references, visibility and imports are
3333
// resolved.
3434
//
3535
// ```
@@ -105,7 +105,7 @@ pub(crate) fn extract_module(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opti
105105
//
106106
//- Thirdly, resolving all the imports this includes removing paths from imports
107107
// outside the module, shifting/cloning them inside new module, or shifting the imports, or making
108-
// new import statemnts
108+
// new import statements
109109

110110
//We are getting item usages and record_fields together, record_fields
111111
//for change_visibility and usages for first point mentioned above in the process
@@ -661,7 +661,7 @@ fn check_intersection_and_push(
661661
import_path: TextRange,
662662
) {
663663
if import_paths_to_be_removed.len() > 0 {
664-
// Text ranges recieved here for imports are extended to the
664+
// Text ranges received here for imports are extended to the
665665
// next/previous comma which can cause intersections among them
666666
// and later deletion of these can cause panics similar
667667
// to reported in #11766. So to mitigate it, we

crates/ide-assists/src/handlers/replace_turbofish_with_explicit_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub(crate) fn replace_turbofish_with_explicit_type(
8888
},
8989
);
9090
} else if let Some(InferType(t)) = let_stmt.ty() {
91-
// If there's a type inferrence underscore, we can offer to replace it with the type in
91+
// If there's a type inference underscore, we can offer to replace it with the type in
9292
// the turbofish.
9393
// let x: _ = fn::<...>();
9494
let underscore_range = t.syntax().text_range();

crates/ide-assists/src/utils/suggest_name.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub(crate) fn for_generic_parameter(ty: &ast::ImplTraitType) -> SmolStr {
7575
/// In current implementation, the function tries to get the name from
7676
/// the following sources:
7777
///
78-
/// * if expr is an argument to function/method, use paramter name
78+
/// * if expr is an argument to function/method, use parameter name
7979
/// * if expr is a function/method call, use function name
8080
/// * expression type name if it exists (E.g. `()`, `fn() -> ()` or `!` do not have names)
8181
/// * fallback: `var_name`
@@ -85,7 +85,7 @@ pub(crate) fn for_generic_parameter(ty: &ast::ImplTraitType) -> SmolStr {
8585
/// Currently it sticks to the first name found.
8686
// FIXME: Microoptimize and return a `SmolStr` here.
8787
pub(crate) fn for_variable(expr: &ast::Expr, sema: &Semantics<'_, RootDatabase>) -> String {
88-
// `from_param` does not benifit from stripping
88+
// `from_param` does not benefit from stripping
8989
// it need the largest context possible
9090
// so we check firstmost
9191
if let Some(name) = from_param(expr, sema) {

crates/ide-completion/src/completions/postfix/format_like.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl FormatStrParser {
173173
}
174174
}
175175
(State::Expr, ':') if chars.peek().copied() == Some(':') => {
176-
// path seperator
176+
// path separator
177177
current_expr.push_str("::");
178178
chars.next();
179179
}
@@ -185,7 +185,7 @@ impl FormatStrParser {
185185
current_expr = String::new();
186186
self.state = State::FormatOpts;
187187
} else {
188-
// We're inside of braced expression, assume that it's a struct field name/value delimeter.
188+
// We're inside of braced expression, assume that it's a struct field name/value delimiter.
189189
current_expr.push(chr);
190190
}
191191
}

crates/ide-completion/src/tests/flyimport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub mod some_module {
159159
pub struct ThiiiiiirdStruct;
160160
// contains all letters from the query, but not in the beginning, displayed second
161161
pub struct AfterThirdStruct;
162-
// contains all letters from the query in the begginning, displayed first
162+
// contains all letters from the query in the beginning, displayed first
163163
pub struct ThirdStruct;
164164
}
165165

crates/ide-db/src/rename.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Definition {
8282
}
8383

8484
/// Textual range of the identifier which will change when renaming this
85-
/// `Definition`. Note that some definitions, like buitin types, can't be
85+
/// `Definition`. Note that some definitions, like builtin types, can't be
8686
/// renamed.
8787
pub fn range_for_rename(self, sema: &Semantics<'_, RootDatabase>) -> Option<FileRange> {
8888
let res = match self {

crates/ide-diagnostics/src/handlers/missing_match_arms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ fn main() {
750750
enum Foo { A }
751751
fn main() {
752752
// FIXME: this should not bail out but current behavior is such as the old algorithm.
753-
// ExprValidator::validate_match(..) checks types of top level patterns incorrecly.
753+
// ExprValidator::validate_match(..) checks types of top level patterns incorrectly.
754754
match Foo::A {
755755
ref _x => {}
756756
Foo::A => {}

0 commit comments

Comments
 (0)