From 12d956fd7ad324ededc96470d9797e235545935a Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 23 Oct 2024 20:22:49 +0800 Subject: [PATCH] Fix typos --- CHANGELOG.md | 4 ++-- src/test/parser.rs | 4 ++-- tests/source/enum.rs | 6 +++--- .../{no_arg_with_commnet.rs => no_arg_with_comment.rs} | 0 tests/target/enum.rs | 6 +++--- tests/target/issue_4573.rs | 2 +- .../{no_arg_with_commnet.rs => no_arg_with_comment.rs} | 0 7 files changed, 11 insertions(+), 11 deletions(-) rename tests/source/{no_arg_with_commnet.rs => no_arg_with_comment.rs} (100%) rename tests/target/{no_arg_with_commnet.rs => no_arg_with_comment.rs} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af60f60dc6..12cc2db51af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64}; ``` [style guide's version sorting algorithm]: https://doc.rust-lang.org/nightly/style-guide/#sorting -- When parsing rustfmt configurations fails, rustfmt will now include the path to the toml file in the erorr message [#6302](https://github.com/rust-lang/rustfmt/issues/6302) +- When parsing rustfmt configurations fails, rustfmt will now include the path to the toml file in the error message [#6302](https://github.com/rust-lang/rustfmt/issues/6302) ### Added - rustfmt now formats trailing where clauses in type aliases [#5887](https://github.com/rust-lang/rustfmt/pull/5887) @@ -133,7 +133,7 @@ ### Changed - `hide_parse_errors` has been soft deprecated and it's been renamed to `show_parse_errors` [#5961](https://github.com/rust-lang/rustfmt/pull/5961). -- The diff output produced by `rustfmt --check` is more compatable with editors that support navigating directly to line numbers [#5971](https://github.com/rust-lang/rustfmt/pull/5971) +- The diff output produced by `rustfmt --check` is more compatible with editors that support navigating directly to line numbers [#5971](https://github.com/rust-lang/rustfmt/pull/5971) - When using `version=Two`, the `trace!` macro from the [log crate] is now formatted similarly to `debug!`, `info!`, `warn!`, and `error!` [#5987](https://github.com/rust-lang/rustfmt/issues/5987). [log crate]: https://crates.io/crates/log diff --git a/src/test/parser.rs b/src/test/parser.rs index d951c8469e6..903d4e48625 100644 --- a/src/test/parser.rs +++ b/src/test/parser.rs @@ -19,11 +19,11 @@ fn parser_errors_in_submods_are_surfaced() { { assert_eq!(&module, exp_mod_name); if let ModuleResolutionErrorKind::ParseError { - file: unparseable_file, + file: unparsable_file, } = kind { assert_eq!( - unparseable_file, + unparsable_file, PathBuf::from("tests/parser/issue-4126/invalid.rs"), ); } else { diff --git a/tests/source/enum.rs b/tests/source/enum.rs index a7b9616929c..badf6ecc057 100644 --- a/tests/source/enum.rs +++ b/tests/source/enum.rs @@ -13,7 +13,7 @@ pub enum Test { pub enum Foo<'a, Y: Baz> where X: Whatever { A, } -enum EmtpyWithComment { +enum EmptyWithComment { // Some comment } @@ -74,7 +74,7 @@ where I: Iterator { } -enum EmtpyWithComment { +enum EmptyWithComment { // Some comment } @@ -94,7 +94,7 @@ fn nested_enum_test() { } } - pub struct EmtpyWithComment { + pub struct EmptyWithComment { // FIXME: Implement this struct } diff --git a/tests/source/no_arg_with_commnet.rs b/tests/source/no_arg_with_comment.rs similarity index 100% rename from tests/source/no_arg_with_commnet.rs rename to tests/source/no_arg_with_comment.rs diff --git a/tests/target/enum.rs b/tests/target/enum.rs index 70fc8ab376c..83b30999725 100644 --- a/tests/target/enum.rs +++ b/tests/target/enum.rs @@ -16,7 +16,7 @@ where A, } -enum EmtpyWithComment { +enum EmptyWithComment { // Some comment } @@ -96,7 +96,7 @@ where Right { list: I, root: T }, // Post Comment } -enum EmtpyWithComment { +enum EmptyWithComment { // Some comment } @@ -135,7 +135,7 @@ fn nested_enum_test() { } } -pub struct EmtpyWithComment { +pub struct EmptyWithComment { // FIXME: Implement this struct } diff --git a/tests/target/issue_4573.rs b/tests/target/issue_4573.rs index 82cfe4f5359..7bb2606d5e6 100644 --- a/tests/target/issue_4573.rs +++ b/tests/target/issue_4573.rs @@ -2,7 +2,7 @@ // rustmft-use_small_heuristics:Max // rustmft-merge_derives:false // These are the same rustfmt configuration options that are used -// in the comiler as of ce39461ca75a and 8eb7c58dbb7b +// in the compiler as of ce39461ca75a and 8eb7c58dbb7b // These are commits in https://github.com/rust-lang/rust #![no_std] // inner attribute comment diff --git a/tests/target/no_arg_with_commnet.rs b/tests/target/no_arg_with_comment.rs similarity index 100% rename from tests/target/no_arg_with_commnet.rs rename to tests/target/no_arg_with_comment.rs