From 7b3ab3d6e029e7a636ace8327afe79704166e1cc Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:56 -0400 Subject: [PATCH 01/26] spelling: config Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec4c682d2c4..2c8169e97d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1031,7 +1031,7 @@ from formatting an attribute #3665 ### Changed -- Replace '--conifig-help' with '--config=help' cb10e06 +- Replace '--config-help' with '--config=help' cb10e06 - Improve formatting of slice patterns #2912 ### Fixed From 1ffd8fcf377770b0966231d98b7dada3c009ef93 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:27:34 -0500 Subject: [PATCH 02/26] spelling: definition Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c8169e97d1..6d703238dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ } ``` - Prevent ICE when formatting `vec!{}` [#5735](https://github.com/rust-lang/rustfmt/issues/5735) -- Prevent internal trailing whitespace error when formatting an empty `macro_rules!` defintion e.g. `macro_rules! foo {}` [#5882](https://github.com/rust-lang/rustfmt/issues/5882) +- Prevent internal trailing whitespace error when formatting an empty `macro_rules!` definition e.g. `macro_rules! foo {}` [#5882](https://github.com/rust-lang/rustfmt/issues/5882) - Formatting doc comment lines that start with `.` or `)` won't be treated as ordered markdown lists because `.` or `)` must be preceded by a number to start an ordered markdown list [#5835](https://github.com/rust-lang/rustfmt/pull/5835) - Add parenthesis around closures when they're used as method receives, don't have a block body, and end with `.` [#4808](https://github.com/rust-lang/rustfmt/issues/4808) ```rust From b5e2bd43e0defac1aec6c6a66d5aa361e5425b7e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:56 -0400 Subject: [PATCH 03/26] spelling: disambiguator Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d703238dae..7a9739b8c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -942,7 +942,7 @@ from formatting an attribute #3665 ### Fixed -- Do not remove path disambiugator inside macro #3142 +- Do not remove path disambiguator inside macro #3142 - Improve handling of Windows newlines #3141 - Fix alignment of a struct's fields (`struct_field_align_threshold` option) with the Visual `indent_style` #3165 - Fix a bug in formatting markdown lists within comments #3172 From 8d06ab4f2bba31a0f28c7cd9b9f795e82453915c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 04/26] spelling: existential Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a9739b8c5e..47f119757c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1075,7 +1075,7 @@ from formatting an attribute #3665 - Add max_width option for all heuristics c2ae39e - Add config option `format_macro_matchers` to format the metavariable matching patterns in macros 79c5ee8 - Add config option `format_macro_bodies` to format the bodies of macros 79c5ee8 -- Format exitential type fc307ff +- Format existential type fc307ff - Support raw identifiers in struct expressions f121b1a - Format Async block and async function 0b25f60 From a4f9edb94167c4dfcd754a1bdd94ab1b84341cac Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 05/26] spelling: explicitly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/overflow.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overflow.rs b/src/overflow.rs index 2f9705ec943..c44f3788d97 100644 --- a/src/overflow.rs +++ b/src/overflow.rs @@ -523,7 +523,7 @@ impl<'a> Context<'a> { // However, when the inner function has a prefix or a suffix // (e.g., `foo() as u32`), this budget reduction may produce poorly // formatted code, where a prefix or a suffix being left on its own - // line. Here we explicitlly check those cases. + // line. Here we explicitly check those cases. if count_newlines(overflowed) == 1 { let rw = self .items From 4c9822685e97d2c9391a4e94325fca4dfb5e0c78 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 06/26] spelling: flattened Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/imports.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imports.rs b/src/imports.rs index 09f6e752338..05195553c08 100644 --- a/src/imports.rs +++ b/src/imports.rs @@ -683,9 +683,9 @@ impl UseTree { let prefix = &self.path[..self.path.len() - 1]; let mut result = vec![]; for nested_use_tree in list { - for flattend in &mut nested_use_tree.clone().flatten(import_granularity) { + for flattened in &mut nested_use_tree.clone().flatten(import_granularity) { let mut new_path = prefix.to_vec(); - new_path.append(&mut flattend.path); + new_path.append(&mut flattened.path); result.push(UseTree { path: new_path, span: self.span, From 6106ba9692cae407bbff6d79276ad1cbfb1c4a1d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:29:13 -0500 Subject: [PATCH 07/26] spelling: globals Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- ci/check_diff.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/check_diff.sh b/ci/check_diff.sh index 42fdcaa6424..3745a49fc82 100755 --- a/ci/check_diff.sh +++ b/ci/check_diff.sh @@ -43,7 +43,7 @@ function init_submodules() { # $2: Output file path for the diff # $3: Any additional configuration options to pass to rustfmt # -# Globlas: +# Globals: # $OPTIONAL_RUSTFMT_CONFIGS: Optional configs passed to the script from $4 function create_diff() { local config; @@ -64,7 +64,7 @@ function create_diff() { # Parameters # $1: Name of the repository (used for logging) # -# Globlas: +# Globals: # $RUSFMT_BIN: Path to the rustfmt master binary. Created when running `compile_rustfmt` # $FEATURE_BIN: Path to the rustfmt feature binary. Created when running `compile_rustfmt` # $OPTIONAL_RUSTFMT_CONFIGS: Optional configs passed to the script from $4 @@ -101,7 +101,7 @@ function check_diff() { # Parameters: # $1: Directory where rustfmt will be cloned # -# Globlas: +# Globals: # $REMOTE_REPO: Clone URL to the rustfmt fork that we want to test # $FEATURE_BRANCH: Name of the feature branch # $OPTIONAL_COMMIT_HASH: Optional commit hash that will be checked out if provided From 64d2790e9fc06a13350a5d016ec43161b8e7d5af Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 08/26] spelling: identified Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/test/configuration_snippet.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/configuration_snippet.rs b/src/test/configuration_snippet.rs index 80b61c88a00..857fff5cf6b 100644 --- a/src/test/configuration_snippet.rs +++ b/src/test/configuration_snippet.rs @@ -208,7 +208,7 @@ impl ConfigCodeBlock { } // Extract a code block from the iterator. Behavior: - // - Rust code blocks are identifed by lines beginning with "```rust". + // - Rust code blocks are identified by lines beginning with "```rust". // - One explicit configuration setting is supported per code block. // - Rust code blocks with no configuration setting are illegal and cause an // assertion failure, unless the snippet begins with #![rustfmt::skip]. From d117add19043e7d9656e299c303f4945c9377de2 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 09/26] spelling: ignorable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/parse/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse/session.rs b/src/parse/session.rs index 646d2d132a8..1435c02c571 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -62,7 +62,7 @@ struct SilentOnIgnoredFilesEmitter { } impl SilentOnIgnoredFilesEmitter { - fn handle_non_ignoreable_error(&mut self, db: &Diagnostic) { + fn handle_non_ignorable_error(&mut self, db: &Diagnostic) { self.has_non_ignorable_parser_errors = true; self.can_reset.store(false, Ordering::Release); self.emitter.emit_diagnostic(db); @@ -86,7 +86,7 @@ impl Emitter for SilentOnIgnoredFilesEmitter { fn emit_diagnostic(&mut self, db: &Diagnostic) { if db.level() == DiagnosticLevel::Fatal { - return self.handle_non_ignoreable_error(db); + return self.handle_non_ignorable_error(db); } if let Some(primary_span) = &db.span.primary_span() { let file_name = self.source_map.span_to_filename(*primary_span); @@ -104,7 +104,7 @@ impl Emitter for SilentOnIgnoredFilesEmitter { } }; } - self.handle_non_ignoreable_error(db); + self.handle_non_ignorable_error(db); } } From 1746baa0c9b6ffa79d91705008abcad7fcd460c2 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:38:16 -0500 Subject: [PATCH 10/26] spelling: inclusive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/visitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visitor.rs b/src/visitor.rs index f4d84d1381f..61e147ed8f5 100644 --- a/src/visitor.rs +++ b/src/visitor.rs @@ -81,7 +81,7 @@ pub(crate) struct FmtVisitor<'a> { pub(crate) snippet_provider: &'a SnippetProvider, pub(crate) line_number: usize, /// List of 1-based line ranges which were annotated with skip - /// Both bounds are inclusifs. + /// Both bounds are inclusive. pub(crate) skipped_range: Rc>>, pub(crate) macro_rewrite_failure: bool, pub(crate) report: FormatReport, From 561495e12dc0f4da99f08815977b790bdb1525d1 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 11/26] spelling: initialized Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/comment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comment.rs b/src/comment.rs index da17bc66b44..dfac9b66db5 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -663,7 +663,7 @@ impl<'a> CommentRewrite<'a> { } /// Check if any characters were written to the result buffer after the start of the comment. - /// when calling [`CommentRewrite::new()`] the result buffer is initiazlied with the opening + /// when calling [`CommentRewrite::new()`] the result buffer is initialized with the opening /// characters for the comment. fn buffer_contains_comment(&self) -> bool { // if self.result.len() < self.opener.len() then an empty comment is in the buffer From 5a2a281be4b72f6fb5a73b73f25889b922550afa Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:56:21 -0400 Subject: [PATCH 12/26] spelling: intellij Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- intellij.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intellij.md b/intellij.md index 6a711c0171a..70170df388f 100644 --- a/intellij.md +++ b/intellij.md @@ -20,7 +20,7 @@ - Open Rustfmt settings (File → Settings → Languages & Frameworks → Rust → Rustfmt) and enable "Run rustfmt on Save" ![run_rustfmt_on_save](https://user-images.githubusercontent.com/6505554/83944610-3468f380-a81e-11ea-9c34-0cbd18dd4969.png) -- IntellJ uses autosave, so now your files will always be formatted according to rustfmt. Alternatively you can use Ctrl+S to reformat file manually +- IntelliJ uses autosave, so now your files will always be formatted according to rustfmt. Alternatively you can use Ctrl+S to reformat file manually ### Bind shortcut to "Reformat File with Rustfmt" action From 4a45e931496886f1ce047e390b3342367579fdeb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 13/26] spelling: into Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/config/config_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/config_type.rs b/src/config/config_type.rs index 7551241fc00..f7cff1a1729 100644 --- a/src/config/config_type.rs +++ b/src/config/config_type.rs @@ -66,7 +66,7 @@ impl ConfigType for IgnoreList { } macro_rules! create_config { - // Options passed in to the macro. + // Options passed into the macro. // // - $i: the ident name of the option // - $ty: the type of the option value From a839a59d3f1b255a192241faefad4a2cd8ad4218 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 14/26] spelling: multi Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/matches.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matches.rs b/src/matches.rs index 72386f0a097..5e36d9e857d 100644 --- a/src/matches.rs +++ b/src/matches.rs @@ -339,10 +339,10 @@ fn flatten_arm_body<'a>( (true, body) } } else { - let cond_becomes_muti_line = opt_shape + let cond_becomes_multi_line = opt_shape .and_then(|shape| rewrite_cond(context, expr, shape)) .map_or(false, |cond| cond.contains('\n')); - if cond_becomes_muti_line { + if cond_becomes_multi_line { (false, &*body) } else { (can_extend(expr), &*expr) From 9702b459fdf18fb38d614a8ca468d42816f010ef Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:58:16 -0400 Subject: [PATCH 15/26] spelling: multiline Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/comment.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/comment.rs b/src/comment.rs index dfac9b66db5..92bbbbe76c9 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -1260,15 +1260,15 @@ pub(crate) enum FullCodeCharKind { InComment, /// Last character of a comment, '\n' for a line comment, '/' for a block comment. EndComment, - /// Start of a mutlitine string inside a comment + /// Start of a multiline string inside a comment StartStringCommented, - /// End of a mutlitine string inside a comment + /// End of a multiline string inside a comment EndStringCommented, /// Inside a commented string InStringCommented, - /// Start of a mutlitine string + /// Start of a multiline string StartString, - /// End of a mutlitine string + /// End of a multiline string EndString, /// Inside a string. InString, From 16193c54129dbee58fbd4e5f28447df285e67464 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:26:13 -0500 Subject: [PATCH 16/26] spelling: neither/nor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- Configurations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations.md b/Configurations.md index af7fa012063..78545c6187a 100644 --- a/Configurations.md +++ b/Configurations.md @@ -1673,7 +1673,7 @@ use core::slice; Controls whether arm bodies are wrapped in cases where the first line of the body cannot fit on the same line as the `=>` operator. -The Style Guide requires that bodies are block wrapped by default if a line break is required after the `=>`, but this option can be used to disable that behavior to prevent wrapping arm bodies in that event, so long as the body does not contain multiple statements nor line comments. +The Style Guide requires that bodies are block wrapped by default if a line break is required after the `=>`, but this option can be used to disable that behavior to prevent wrapping arm bodies in that event, so long as the body contains neither multiple statements nor line comments. - **Default value**: `true` - **Possible values**: `true`, `false` From b59d77f7e012c515d57dee66ee58cb5f3d6eae4f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 17/26] spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/items.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items.rs b/src/items.rs index c6976324c71..8669bdda32b 100644 --- a/src/items.rs +++ b/src/items.rs @@ -2506,7 +2506,7 @@ fn rewrite_fn_base( || context.config.indent_style() == IndentStyle::Visual { let indent = if param_str.is_empty() { - // Aligning with non-existent params looks silly. + // Aligning with nonexistent params looks silly. force_new_line_for_brace = true; indent + 4 } else { @@ -2521,7 +2521,7 @@ fn rewrite_fn_base( } else { let mut ret_shape = Shape::indented(indent, context.config); if param_str.is_empty() { - // Aligning with non-existent params looks silly. + // Aligning with nonexistent params looks silly. force_new_line_for_brace = true; ret_shape = if context.use_block_indent() { ret_shape.offset_left(4).unwrap_or(ret_shape) From caf9aab3bfb09f26aab5fd23da89f6f15184df74 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 18/26] spelling: resolving Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/parse/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/session.rs b/src/parse/session.rs index 1435c02c571..b136820087d 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -190,7 +190,7 @@ impl ParseSess { ) -> Result> { rustc_expand::module::default_submod_path(&self.parse_sess, id, relative, dir_path).or_else( |e| { - // If resloving a module relative to {dir_path}/{symbol} fails because a file + // If resolving a module relative to {dir_path}/{symbol} fails because a file // could not be found, then try to resolve the module relative to {dir_path}. // If we still can't find the module after searching for it in {dir_path}, // surface the original error. From 62dd5f2d745bb734ced71e51a3338eb38f82869a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:32:52 -0500 Subject: [PATCH 19/26] spelling: rustc Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47f119757c0..f7093dab837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1131,7 +1131,7 @@ from formatting an attribute #3665 ### Changed -- Update rustc-ap-syntax to 128.0.0 and ustc-ap-rustc_target to 128.0.0 195395f +- Update rustc-ap-syntax to 128.0.0 and rustc-ap-rustc_target to 128.0.0 195395f - Put operands on its own line when each fits in a single line f8439ce - Improve CLI options 55ac062 1869888 798bffb 4d9de48 eca7796 8396da1 5d9f5aa From ce555adef5f5c399cc390b94aeaa485d2857ce7c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:57 -0400 Subject: [PATCH 20/26] spelling: semantics Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/config/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/options.rs b/src/config/options.rs index e7fd2cfbd31..d6107ed5c2e 100644 --- a/src/config/options.rs +++ b/src/config/options.rs @@ -416,7 +416,7 @@ pub trait CliOptions { fn config_path(&self) -> Option<&Path>; } -/// The edition of the syntax and semntics of code (RFC 2052). +/// The edition of the syntax and semantics of code (RFC 2052). #[config_type] pub enum Edition { #[value = "2015"] From 11c902b4a0b9d79ff8839769af166fbf3cbdf95a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:30:44 -0500 Subject: [PATCH 21/26] spelling: several Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7093dab837..4a76cc1309d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -184,7 +184,7 @@ - Simplify the rustfmt help text by eliding the full path to the rustfmt binary path from the usage string when running `rustfmt --help` [#5214](https://github.com/rust-lang/rustfmt/issues/5214) -- Bumped the version for serveral dependencies. Most notably `dirs` `v2.0.1` -> `v4.0.0`. This changed the global user config directory on macOS from `$HOME/Library/Preferences` to `$HOME/Library/Application Support` [#5237](https://github.com/rust-lang/rustfmt/pull/5237) +- Bumped the version for several dependencies. Most notably `dirs` `v2.0.1` -> `v4.0.0`. This changed the global user config directory on macOS from `$HOME/Library/Preferences` to `$HOME/Library/Application Support` [#5237](https://github.com/rust-lang/rustfmt/pull/5237) ### Fixed From a69d07caa0ce9a622d46dd079ba76cbc8252d867 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:58 -0400 Subject: [PATCH 22/26] spelling: submodule Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/parse/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/session.rs b/src/parse/session.rs index b136820087d..5de6ee49acf 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -179,7 +179,7 @@ impl ParseSess { /// /// * `id` - The name of the module /// * `relative` - If Some(symbol), the symbol name is a directory relative to the dir_path. - /// If relative is Some, resolve the submodle at {dir_path}/{symbol}/{id}.rs + /// If relative is Some, resolve the submodule at {dir_path}/{symbol}/{id}.rs /// or {dir_path}/{symbol}/{id}/mod.rs. if None, resolve the module at {dir_path}/{id}.rs. /// * `dir_path` - Module resolution will occur relative to this directory. pub(crate) fn default_submod_path( From 2781afc307eb98046bf8c30debd70697749143fc Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:58 -0400 Subject: [PATCH 23/26] spelling: submodules Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- ci/check_diff.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/check_diff.sh b/ci/check_diff.sh index 3745a49fc82..d0705e4660d 100755 --- a/ci/check_diff.sh +++ b/ci/check_diff.sh @@ -28,7 +28,7 @@ function clone_repo() { GIT_TERMINAL_PROMPT=0 git clone --quiet $1 --depth 1 $2 && cd $2 } -# Initialize Git submoduels for the repo. +# Initialize Git submodules for the repo. # # Parameters # $1: list of directories to initialize From ef9e1c6b3d49859259741e855bf4317b30f64751 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 13 Apr 2023 18:34:58 -0400 Subject: [PATCH 24/26] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 2 +- Processes.md | 2 +- src/comment.rs | 2 +- src/config/options.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a76cc1309d..0a2455dd6de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1195,7 +1195,7 @@ from formatting an attribute #3665 - Do not collapse block around expr with condition on match arm 5b9b7d5 - Use vertical layout for complex attributes c77708f - Format array using heuristics for function calls 98c6f7b -- Implement stable ordering for impl items with the the following item priority: type, const, macro, then method fa80ddf +- Implement stable ordering for impl items with the following item priority: type, const, macro, then method fa80ddf - Reorder imports by default 164cf7d - Group `extern crate` by default 3a138a2 - Make `error_on_line_overflow` false by default f146711 diff --git a/Processes.md b/Processes.md index 61abc87eec9..64ef20a9bd7 100644 --- a/Processes.md +++ b/Processes.md @@ -16,7 +16,7 @@ In this Section, we describe how to stabilise an option of the rustfmt's configu Open a pull request that closes the tracking issue. The tracking issue is listed beside the option in `Configurations.md`. - Update the `Config` enum marking the option as stable. -- Update the the `Configuration.md` file marking the option as stable. +- Update the `Configuration.md` file marking the option as stable. - Update `CHANGELOG.md` marking the option as stable. ## After the stabilisation diff --git a/src/comment.rs b/src/comment.rs index 92bbbbe76c9..55e710bd27d 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -205,7 +205,7 @@ pub(crate) fn combine_strs_with_missing_comments( // We have a missing comment between the first expression and the second expression. - // Peek the the original source code and find out whether there is a newline between the first + // Peek the original source code and find out whether there is a newline between the first // expression and the second expression or the missing comment. We will preserve the original // layout whenever possible. let original_snippet = context.snippet(span); diff --git a/src/config/options.rs b/src/config/options.rs index d6107ed5c2e..3c5c713a33a 100644 --- a/src/config/options.rs +++ b/src/config/options.rs @@ -191,7 +191,7 @@ pub enum Color { pub enum Version { /// 1.x.y. When specified, rustfmt will format in the same style as 1.0.0. One, - /// 2.x.y. When specified, rustfmt will format in the the latest style. + /// 2.x.y. When specified, rustfmt will format in the latest style. Two, } From 8a26a308562fc4f4251b2eee8981971154a2b6a3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:32:05 -0500 Subject: [PATCH 25/26] spelling: there Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index c7c2d4e48a8..9484b2e5829 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -287,7 +287,7 @@ impl Config { } } - // If none was found ther either, check in the user's configuration directory. + // If none was found there either, check in the user's configuration directory. if let Some(mut config_dir) = dirs::config_dir() { config_dir.push("rustfmt"); if let Some(path) = get_toml_path(&config_dir)? { From 9e6444fa23bee544043a7c3e672687cc126fb4ca Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:33:04 -0500 Subject: [PATCH 26/26] spelling: version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- ci/check_diff.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/check_diff.sh b/ci/check_diff.sh index d0705e4660d..93de6040339 100755 --- a/ci/check_diff.sh +++ b/ci/check_diff.sh @@ -111,8 +111,8 @@ function compile_rustfmt() { git remote add feature $REMOTE_REPO git fetch feature $FEATURE_BRANCH - CARGO_VERSON=$(cargo --version) - echo -e "\ncompiling with $CARGO_VERSON\n" + CARGO_VERSION=$(cargo --version) + echo -e "\ncompiling with $CARGO_VERSION\n" # Because we're building standalone binaries we need to set `LD_LIBRARY_PATH` so each # binary can find it's runtime dependencies. See https://github.com/rust-lang/rustfmt/issues/5675