Skip to content

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 => {}

crates/mbe/src/expander/matcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ struct MatchState<'t> {
321321
/// The KleeneOp of this sequence if we are in a repetition.
322322
sep_kind: Option<RepeatKind>,
323323

324-
/// Number of tokens of seperator parsed
324+
/// Number of tokens of separator parsed
325325
sep_parsed: Option<usize>,
326326

327327
/// Matched meta variables bindings

crates/project-model/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//!
44
//! Pure model is represented by the [`base_db::CrateGraph`] from another crate.
55
//!
6-
//! In this crate, we are conserned with "real world" project models.
6+
//! In this crate, we are concerned with "real world" project models.
77
//!
88
//! Specifically, here we have a representation for a Cargo project
99
//! ([`CargoWorkspace`]) and for manually specified layout ([`ProjectJson`]).

crates/project-model/src/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ fn handle_rustc_crates(
770770
queue.push_back(root_pkg);
771771
while let Some(pkg) = queue.pop_front() {
772772
// Don't duplicate packages if they are dependended on a diamond pattern
773-
// N.B. if this line is ommitted, we try to analyse over 4_800_000 crates
773+
// N.B. if this line is omitted, we try to analyse over 4_800_000 crates
774774
// which is not ideal
775775
if rustc_pkg_crates.contains_key(&pkg) {
776776
continue;

crates/rust-analyzer/src/bin/logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl Logger {
5252
// merge chalk filter to our main filter (from RA_LOG env).
5353
//
5454
// The acceptable syntax of CHALK_DEBUG is `target[span{field=value}]=level`.
55-
// As the value should only affect chalk crates, we'd better mannually
55+
// As the value should only affect chalk crates, we'd better manually
5656
// specify the target. And for simplicity, CHALK_DEBUG only accept the value
5757
// that specify level.
5858
let chalk_level_dir = std::env::var("CHALK_DEBUG")

crates/syntax/src/hacks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Things which exist to solve practial issues, but which shouldn't exist.
1+
//! Things which exist to solve practical issues, but which shouldn't exist.
22
//!
33
//! Please avoid adding new usages of the functions in this module
44

crates/vfs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub struct FileId(pub u32);
6464

6565
/// Storage for all files read by rust-analyzer.
6666
///
67-
/// For more informations see the [crate-level](crate) documentation.
67+
/// For more information see the [crate-level](crate) documentation.
6868
#[derive(Default)]
6969
pub struct Vfs {
7070
interner: PathInterner,

docs/dev/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Mind the code--architecture gap: at the moment, we are using fewer feature flags
485485
### Serialization
486486

487487
In Rust, it is easy (often too easy) to add serialization to any type by adding `#[derive(Serialize)]`.
488-
This easiness is misleading -- serializable types impose significant backwards compatability constraints.
488+
This easiness is misleading -- serializable types impose significant backwards compatibility constraints.
489489
If a type is serializable, then it is a part of some IPC boundary.
490490
You often don't control the other side of this boundary, so changing serializable types is hard.
491491

editors/code/src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
655655
html, body { margin:0; padding:0; overflow:hidden }
656656
svg { position:fixed; top:0; left:0; height:100%; width:100% }
657657
658-
/* Disable the graphviz backgroud and fill the polygons */
658+
/* Disable the graphviz background and fill the polygons */
659659
.graph > polygon { display:none; }
660660
:is(.node,.edge) polygon { fill: white; }
661661

editors/code/src/toolchain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const getPathForExecutable = memoizeAsync(
158158

159159
try {
160160
// hmm, `os.homedir()` seems to be infallible
161-
// it is not mentioned in docs and cannot be infered by the type signature...
161+
// it is not mentioned in docs and cannot be inferred by the type signature...
162162
const standardPath = vscode.Uri.joinPath(
163163
vscode.Uri.file(os.homedir()),
164164
".cargo",

0 commit comments

Comments
 (0)