Skip to content

Fix typos #5486

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

Merged
merged 2 commits into from
Aug 6, 2022
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ from formatting an attribute #3665
- Fix formatting of raw string literals #2983
- Handle chain with try operators with spaces #2986
- Use correct shape in Visual tuple rewriting #2987
- Impove formatting of arguments with `visual_style = "Visual"` option #2988
- Improve formatting of arguments with `visual_style = "Visual"` option #2988
- Change `print_diff` to output the correct line number 992b179
- Propagate errors about failing to rewrite a macro 6f318e3
- Handle formatting of long function signature #3010
Expand Down
2 changes: 1 addition & 1 deletion Processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This document outlines processes regarding management of rustfmt.

# Stabilising an Option

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

## Conditions

Expand Down
2 changes: 1 addition & 1 deletion src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn make_opts() -> Options {
"l",
"files-with-diff",
"Prints the names of mismatched files that were formatted. Prints the names of \
files that would be formated when used with `--check` mode. ",
files that would be formatted when used with `--check` mode. ",
);
opts.optmulti(
"",
Expand Down
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ create_config! {
make_backup: bool, false, false, "Backup changed files";
print_misformatted_file_names: bool, false, true,
"Prints the names of mismatched files that were formatted. Prints the names of \
files that would be formated when used with `--check` mode. ";
files that would be formatted when used with `--check` mode. ";
}

#[derive(Error, Debug)]
Expand Down
4 changes: 2 additions & 2 deletions src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ fn flatten_use_trees(
use_trees: Vec<UseTree>,
import_granularity: ImportGranularity,
) -> Vec<UseTree> {
// Return non-sorted single occurance of the use-trees text string;
// order is by first occurance of the use-tree.
// Return non-sorted single occurrence of the use-trees text string;
// order is by first occurrence of the use-tree.
use_trees
.into_iter()
.flat_map(|tree| tree.flatten(import_granularity))
Expand Down
2 changes: 1 addition & 1 deletion tests/mod-resolver/issue-5198/lib/c/d/explanation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The directory name './lib/c/d/' conflicts with the './lib/c/d.rs' file name.
* mod g;

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

'./lib/c/d/f.rs' and './lib/c/d/g/mod.rs' exist at the default submodule paths so we should be able
Expand Down
2 changes: 1 addition & 1 deletion tests/mod-resolver/issue-5198/lib/explanation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The directory name './lib' conflicts with the './lib.rs' file name.
* mod c;

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

'./lib/b.rs' and './lib/c/mod.rs' exist at the default submodule paths so we should be able
Expand Down
2 changes: 1 addition & 1 deletion tests/source/cfg_if/detect/arch/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ pub enum Feature {
tbm,
/// POPCNT (Population Count)
popcnt,
/// FXSR (Floating-point context fast save and restor)
/// FXSR (Floating-point context fast save and restore)
fxsr,
/// XSAVE (Save Processor Extended States)
xsave,
Expand Down
2 changes: 1 addition & 1 deletion tests/source/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum StructLikeVariants {
Normal(u32, String, ),
StructLike { x: i32, // Test comment
// Pre-comment
#[Attr50] y: SomeType, // Aanother Comment
#[Attr50] y: SomeType, // Another Comment
}, SL { a: A }
}

Expand Down
2 changes: 1 addition & 1 deletion tests/source/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test tuple litterals
// Test tuple literals

fn foo() {
let a = (a, a, a, a, a);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
///
fn foo() {}

/// A long commment for wrapping
/// A long comment for wrapping
/// This is a long long long long long long long long long long long long long long long long long long long long sentence.
fn bar() {}
2 changes: 1 addition & 1 deletion tests/target/cfg_if/detect/arch/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pub enum Feature {
tbm,
/// POPCNT (Population Count)
popcnt,
/// FXSR (Floating-point context fast save and restor)
/// FXSR (Floating-point context fast save and restore)
fxsr,
/// XSAVE (Save Processor Extended States)
xsave,
Expand Down
2 changes: 1 addition & 1 deletion tests/target/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum StructLikeVariants {
x: i32, // Test comment
// Pre-comment
#[Attr50]
y: SomeType, // Aanother Comment
y: SomeType, // Another Comment
},
SL {
a: A,
Expand Down
2 changes: 1 addition & 1 deletion tests/target/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test tuple litterals
// Test tuple literals

fn foo() {
let a = (a, a, a, a, a);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// ```
fn foo() {}

/// A long commment for wrapping
/// A long comment for wrapping
/// This is a long long long long long long long long long long long long long
/// long long long long long long long sentence.
fn bar() {}