From 20a05ba9e1829a222833784472e24b1269421df8 Mon Sep 17 00:00:00 2001 From: jimmycathy Date: Sun, 16 Mar 2025 12:26:08 +0800 Subject: [PATCH] chore: fix some typos Signed-off-by: jimmycathy --- src/cargo/core/compiler/build_context/target_info.rs | 4 ++-- src/cargo/sources/path.rs | 2 +- src/cargo/util/semver_eval_ext.rs | 2 +- src/doc/src/reference/config.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index d12c39b4dd8..9726266bbac 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -97,7 +97,7 @@ pub struct FileType { } impl FileType { - /// The filename for this `FileType` crated by rustc. + /// The filename for this `FileType` created by rustc. pub fn output_filename(&self, target: &Target, metadata: Option<&str>) -> String { match metadata { Some(metadata) => format!( @@ -628,7 +628,7 @@ impl TargetInfo { /// Checks if a target maybe support std. /// - /// If no explictly stated in target spec json, we treat it as "maybe support". + /// If no explicitly stated in target spec json, we treat it as "maybe support". /// /// This is only useful for `-Zbuild-std` to determine the default set of /// crates it is going to build. diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index c1e81528fbd..664d231c8d2 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -839,7 +839,7 @@ fn list_files_gix( files.push(PathEntry { path: file_path, ty, - // Git index doesn't include files from symlink diretory, + // Git index doesn't include files from symlink directory, // symlink dirs are handled in `list_files_walk`. under_symlink_dir: false, }); diff --git a/src/cargo/util/semver_eval_ext.rs b/src/cargo/util/semver_eval_ext.rs index a402f454412..1a32d30382c 100644 --- a/src/cargo/util/semver_eval_ext.rs +++ b/src/cargo/util/semver_eval_ext.rs @@ -160,7 +160,7 @@ fn matches_exact_prerelease(cmp: &Comparator, ver: &Version) -> bool { } // If the comparator has a prerelease tag like =3.0.0-alpha.24, - // then it shoud be only exactly match 3.0.0-alpha.24. + // then it should be only exactly match 3.0.0-alpha.24. if !cmp.pre.is_empty() { return false; } diff --git a/src/doc/src/reference/config.md b/src/doc/src/reference/config.md index 3345cb813e4..2986a01f94a 100644 --- a/src/doc/src/reference/config.md +++ b/src/doc/src/reference/config.md @@ -1367,7 +1367,7 @@ Sets the width for progress bar. * Default: auto-detect * Environment: `CARGO_TERM_PROGRESS_TERM_INTEGRATION` -Report progress to the teminal emulator for display in places like the task bar. +Report progress to the terminal emulator for display in places like the task bar. [`cargo bench`]: ../commands/cargo-bench.md [`cargo login`]: ../commands/cargo-login.md