Skip to content

Commit 662702e

Browse files
Fix typos (rust-lang#5486)
* Fix typos * Fix typos
1 parent 23ef4b7 commit 662702e

File tree

15 files changed

+16
-16
lines changed

15 files changed

+16
-16
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ from formatting an attribute #3665
840840
- Fix formatting of raw string literals #2983
841841
- Handle chain with try operators with spaces #2986
842842
- Use correct shape in Visual tuple rewriting #2987
843-
- Impove formatting of arguments with `visual_style = "Visual"` option #2988
843+
- Improve formatting of arguments with `visual_style = "Visual"` option #2988
844844
- Change `print_diff` to output the correct line number 992b179
845845
- Propagate errors about failing to rewrite a macro 6f318e3
846846
- Handle formatting of long function signature #3010

Processes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This document outlines processes regarding management of rustfmt.
22

33
# Stabilising an Option
44

5-
In this Section, we describe how to stabilise an option of the rustfmt's configration.
5+
In this Section, we describe how to stabilise an option of the rustfmt's configuration.
66

77
## Conditions
88

src/bin/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ fn make_opts() -> Options {
136136
"l",
137137
"files-with-diff",
138138
"Prints the names of mismatched files that were formatted. Prints the names of \
139-
files that would be formated when used with `--check` mode. ",
139+
files that would be formatted when used with `--check` mode. ",
140140
);
141141
opts.optmulti(
142142
"",

src/config/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ create_config! {
182182
make_backup: bool, false, false, "Backup changed files";
183183
print_misformatted_file_names: bool, false, true,
184184
"Prints the names of mismatched files that were formatted. Prints the names of \
185-
files that would be formated when used with `--check` mode. ";
185+
files that would be formatted when used with `--check` mode. ";
186186
}
187187

188188
#[derive(Error, Debug)]

src/imports.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ fn flatten_use_trees(
251251
use_trees: Vec<UseTree>,
252252
import_granularity: ImportGranularity,
253253
) -> Vec<UseTree> {
254-
// Return non-sorted single occurance of the use-trees text string;
255-
// order is by first occurance of the use-tree.
254+
// Return non-sorted single occurrence of the use-trees text string;
255+
// order is by first occurrence of the use-tree.
256256
use_trees
257257
.into_iter()
258258
.flat_map(|tree| tree.flatten(import_granularity))

tests/mod-resolver/issue-5198/lib/c/d/explanation.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The directory name './lib/c/d/' conflicts with the './lib/c/d.rs' file name.
99
* mod g;
1010

1111
Module resolution will fail if we look for './lib/c/d/e.rs' or './lib/c/d/e/mod.rs',
12-
so we should fall back to looking for './lib/c/e.rs', which correctly finds the modlue, that
12+
so we should fall back to looking for './lib/c/e.rs', which correctly finds the module, that
1313
rustfmt should format.
1414

1515
'./lib/c/d/f.rs' and './lib/c/d/g/mod.rs' exist at the default submodule paths so we should be able

tests/mod-resolver/issue-5198/lib/explanation.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The directory name './lib' conflicts with the './lib.rs' file name.
99
* mod c;
1010

1111
Module resolution will fail if we look for './lib/a.rs' or './lib/a/mod.rs',
12-
so we should fall back to looking for './a.rs', which correctly finds the modlue that
12+
so we should fall back to looking for './a.rs', which correctly finds the module that
1313
rustfmt should format.
1414

1515
'./lib/b.rs' and './lib/c/mod.rs' exist at the default submodule paths so we should be able

tests/source/cfg_if/detect/arch/x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ pub enum Feature {
329329
tbm,
330330
/// POPCNT (Population Count)
331331
popcnt,
332-
/// FXSR (Floating-point context fast save and restor)
332+
/// FXSR (Floating-point context fast save and restore)
333333
fxsr,
334334
/// XSAVE (Save Processor Extended States)
335335
xsave,

tests/source/enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ enum StructLikeVariants {
3636
Normal(u32, String, ),
3737
StructLike { x: i32, // Test comment
3838
// Pre-comment
39-
#[Attr50] y: SomeType, // Aanother Comment
39+
#[Attr50] y: SomeType, // Another Comment
4040
}, SL { a: A }
4141
}
4242

tests/source/tuple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Test tuple litterals
1+
// Test tuple literals
22

33
fn foo() {
44
let a = (a, a, a, a, a);

tests/source/wrap_comments_should_not_imply_format_doc_comments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
///
1212
fn foo() {}
1313

14-
/// A long commment for wrapping
14+
/// A long comment for wrapping
1515
/// This is a long long long long long long long long long long long long long long long long long long long long sentence.
1616
fn bar() {}

tests/target/cfg_if/detect/arch/x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ pub enum Feature {
314314
tbm,
315315
/// POPCNT (Population Count)
316316
popcnt,
317-
/// FXSR (Floating-point context fast save and restor)
317+
/// FXSR (Floating-point context fast save and restore)
318318
fxsr,
319319
/// XSAVE (Save Processor Extended States)
320320
xsave,

tests/target/enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ enum StructLikeVariants {
4343
x: i32, // Test comment
4444
// Pre-comment
4545
#[Attr50]
46-
y: SomeType, // Aanother Comment
46+
y: SomeType, // Another Comment
4747
},
4848
SL {
4949
a: A,

tests/target/tuple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Test tuple litterals
1+
// Test tuple literals
22

33
fn foo() {
44
let a = (a, a, a, a, a);

tests/target/wrap_comments_should_not_imply_format_doc_comments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// ```
1111
fn foo() {}
1212

13-
/// A long commment for wrapping
13+
/// A long comment for wrapping
1414
/// This is a long long long long long long long long long long long long long
1515
/// long long long long long long long sentence.
1616
fn bar() {}

0 commit comments

Comments
 (0)