Skip to content

Commit f9335ba

Browse files
committed
Auto merge of #12707 - epage:spell, r=ehuss
chore: Fix typos This is a repeat of #11561
2 parents 808ffa9 + e4e10f2 commit f9335ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+49
-49
lines changed

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@
429429
[#10877](https://github.com/rust-lang/cargo/pull/10877)
430430
- SemVer: It is not a breaking change to make an unsafe function safe.
431431
[#12116](https://github.com/rust-lang/cargo/pull/12116)
432-
- SemVer: changeing MSRV is generally a minor change.
432+
- SemVer: changing MSRV is generally a minor change.
433433
[#12122](https://github.com/rust-lang/cargo/pull/12122)
434434
- Clarify when and how to `cargo yank`.
435435
[#11862](https://github.com/rust-lang/cargo/pull/11862)
@@ -728,9 +728,9 @@
728728

729729
- Clarified the difference between `CARGO_CRATE_NAME` and `CARGO_PKG_NAME`.
730730
[#11576](https://github.com/rust-lang/cargo/pull/11576)
731-
- Added links to the Target section of the glossary for occurences of target triple.
731+
- Added links to the Target section of the glossary for occurrences of target triple.
732732
[#11603](https://github.com/rust-lang/cargo/pull/11603)
733-
- Described how the current resolver sometimes duplicates depenencies.
733+
- Described how the current resolver sometimes duplicates dependencies.
734734
[#11604](https://github.com/rust-lang/cargo/pull/11604)
735735
- Added a note about verifying your email address on crates.io.
736736
[#11620](https://github.com/rust-lang/cargo/pull/11620)
@@ -889,7 +889,7 @@
889889

890890
### Nightly only
891891

892-
- Implemented a inital support of asymmetric token authentication for registries.
892+
- Implemented a initial support of asymmetric token authentication for registries.
893893
([RFC 3231](https://github.com/rust-lang/rfcs/blob/master/text/3231-cargo-asymmetric-tokens.md))
894894
([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#registry-auth))
895895
[#10771](https://github.com/rust-lang/cargo/pull/10771)

crates/crates-io/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub enum Error {
142142
#[error(transparent)]
143143
Curl(#[from] curl::Error),
144144

145-
/// Error from seriailzing the request payload and deserialzing the
145+
/// Error from seriailzing the request payload and deserializing the
146146
/// response body (like response body didn't match expected structure).
147147
#[error(transparent)]
148148
Json(#[from] serde_json::Error),

crates/xtask-bump-check/src/xtask.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fn bump_check(args: &clap::ArgMatches, config: &cargo::util::Config) -> CargoRes
161161
];
162162

163163
// Even when we test against baseline-rev, we still need to make sure a
164-
// change doesn't violate SemVer rules aginst crates.io releases. The
164+
// change doesn't violate SemVer rules against crates.io releases. The
165165
// possibility of this happening is nearly zero but no harm to check twice.
166166
let mut cmd = ProcessBuilder::new("cargo");
167167
cmd.arg("semver-checks")
@@ -397,7 +397,7 @@ fn check_crates_io<'a>(
397397
Ok(())
398398
}
399399

400-
/// Checkouts a temporary workspace to do further version comparsions.
400+
/// Checkouts a temporary workspace to do further version comparisons.
401401
fn checkout_ws<'cfg, 'a>(
402402
ws: &Workspace<'cfg>,
403403
repo: &'a git2::Repository,

src/bin/cargo/cli.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ For more information, see issue #10049 <https://github.com/rust-lang/cargo/issue
314314
} else {
315315
config.shell().warn(format_args!(
316316
"\
317-
user-defined alias `{cmd}` has the appearance of a manfiest-command
317+
user-defined alias `{cmd}` has the appearance of a manifest-command
318318
This was previously accepted but will be phased out when `-Zscript` is stabilized.
319319
For more information, see issue #12207 <https://github.com/rust-lang/cargo/issues/12207>."
320320
))?;
@@ -449,7 +449,7 @@ impl Exec {
449449
if !config.cli_unstable().script && ext_path.is_some() {
450450
config.shell().warn(format_args!(
451451
"\
452-
external subcommand `{cmd}` has the appearance of a manfiest-command
452+
external subcommand `{cmd}` has the appearance of a manifest-command
453453
This was previously accepted but will be phased out when `-Zscript` is stabilized.
454454
For more information, see issue #12207 <https://github.com/rust-lang/cargo/issues/12207>.",
455455
))?;

src/cargo/core/compiler/context/compilation_files.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> {
547547

548548
/// Gets the metadata hash for the given [`Unit`].
549549
///
550-
/// Whne a metadata hash doesn't exist for the given unit,
550+
/// When a metadata hash doesn't exist for the given unit,
551551
/// this calls itself recursively to compute metadata hashes of all its dependencies.
552552
/// See [`compute_metadata`] for how a single metadata hash is computed.
553553
fn metadata_of<'a>(

src/cargo/core/compiler/custom_build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fn emit_build_output(
240240
///
241241
/// The construction includes:
242242
///
243-
/// * Set environment varibles for the build script run.
243+
/// * Set environment variables for the build script run.
244244
/// * Create the output dir (`OUT_DIR`) for the build script output.
245245
/// * Determine if the build script needs a re-run.
246246
/// * Run the build script and store its output.
@@ -827,7 +827,7 @@ impl BuildOutput {
827827
None => return false,
828828
Some(n) => n,
829829
};
830-
// ALLOWED: the process of rustc boostrapping reads this through
830+
// ALLOWED: the process of rustc bootstrapping reads this through
831831
// `std::env`. We should make the behavior consistent. Also, we
832832
// don't advertise this for bypassing nightly.
833833
#[allow(clippy::disallowed_methods)]

src/cargo/core/compiler/fingerprint/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ fn compare_old_fingerprint(
17641764

17651765
/// Logs the result of fingerprint comparison.
17661766
///
1767-
/// TODO: Obsolete and mostly superceded by [`DirtyReason`]. Could be removed.
1767+
/// TODO: Obsolete and mostly superseded by [`DirtyReason`]. Could be removed.
17681768
fn log_compare(unit: &Unit, compare: &CargoResult<Option<DirtyReason>>) {
17691769
match compare {
17701770
Ok(None) => {}
@@ -1820,7 +1820,7 @@ pub fn parse_dep_info(
18201820
Ok(Some(ret))
18211821
}
18221822

1823-
/// Calcuates the fingerprint of a unit thats contains no dep-info files.
1823+
/// Calculates the fingerprint of a unit thats contains no dep-info files.
18241824
fn pkg_fingerprint(bcx: &BuildContext<'_, '_>, pkg: &Package) -> CargoResult<String> {
18251825
let source_id = pkg.package_id().source_id();
18261826
let sources = bcx.packages.sources();

src/cargo/core/compiler/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
//! like what rustc has done[^1]. Also, no one knows if Cargo really needs that.
1212
//! To be pragmatic, here we list a handful of items you may want to learn:
1313
//!
14-
//! * [`BuildContext`] is a static context containg all information you need
14+
//! * [`BuildContext`] is a static context containing all information you need
1515
//! before a build gets started.
1616
//! * [`Context`] is the center of the world, coordinating a running build and
1717
//! collecting information from it.
1818
//! * [`custom_build`] is the home of build script executions and output parsing.
1919
//! * [`fingerprint`] not only defines but also executes a set of rules to
2020
//! determine if a re-compile is needed.
2121
//! * [`job_queue`] is where the parallelism, job scheduling, and communication
22-
//! machinary happen between Cargo and the compiler.
22+
//! machinery happen between Cargo and the compiler.
2323
//! * [`layout`] defines and manages output artifacts of a build in the filesystem.
2424
//! * [`unit_dependencies`] is for building a dependency graph for compilation
2525
//! from a result of dependency resolution.

src/cargo/core/features.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ pub fn channel() -> String {
12091209
if let Ok(override_channel) = env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS") {
12101210
return override_channel;
12111211
}
1212-
// ALLOWED: the process of rustc boostrapping reads this through
1212+
// ALLOWED: the process of rustc bootstrapping reads this through
12131213
// `std::env`. We should make the behavior consistent. Also, we
12141214
// don't advertise this for bypassing nightly.
12151215
#[allow(clippy::disallowed_methods)]

src/cargo/core/registry.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ impl<'cfg> PackageRegistry<'cfg> {
399399
// Note that this is somewhat subtle where the list of `ids` for a
400400
// canonical URL is extend with possibly two ids per summary. This is done
401401
// to handle the transition from the v2->v3 lock file format where in
402-
// v2 DefeaultBranch was either DefaultBranch or Branch("master") for
402+
// v2 DefaultBranch was either DefaultBranch or Branch("master") for
403403
// git dependencies. In this case if `summary.package_id()` is
404404
// Branch("master") then alt_package_id will be DefaultBranch. This
405405
// signifies that there's a patch available for either of those

src/cargo/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! - <https://doc.rust-lang.org/nightly/nightly-rustc/cargo>: targeted at cargo contributors
88
//! - Updated on each update of the `cargo` submodule in `rust-lang/rust`
99
//!
10-
//! **WARNING:** Using Cargo as a library has drawbacks, particulary the API is unstable,
10+
//! **WARNING:** Using Cargo as a library has drawbacks, particularly the API is unstable,
1111
//! and there is no clear path to stabilize it soon at the time of writing. See [The Cargo Book:
1212
//! External tools] for more on this topic.
1313
//!

src/cargo/ops/cargo_output_metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn build_resolve_graph_r(
316316
dep_kinds,
317317
},
318318
// No lib or artifact dep exists.
319-
// Ususally this mean parent depending on non-lib bin crate.
319+
// Usually this mean parent depending on non-lib bin crate.
320320
(None, _) => continue,
321321
};
322322

src/cargo/sources/git/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! Apparently, the most important type in this module is [`GitSource`].
44
//! [`utils`] provides libgit2 utilities like fetch and checkout, whereas
5-
//! [`oxide`] is the couterpart for gitoxide integration. [`known_hosts`]
5+
//! [`oxide`] is the counterpart for gitoxide integration. [`known_hosts`]
66
//! is the mitigation of [CVE-2022-46176].
77
//!
88
//! [CVE-2022-46176]: https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html

src/cargo/sources/git/oxide.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ pub fn cargo_config_to_gitoxide_overrides(config: &Config) -> CargoResult<Vec<BS
353353
Ok(values)
354354
}
355355

356-
/// Reinitializes a given Git repository. This is useful when a Git repoistory
356+
/// Reinitializes a given Git repository. This is useful when a Git repository
357357
/// seems corrupted and we want to start over.
358358
pub fn reinitialize(git_dir: &Path) -> CargoResult<()> {
359359
fn init(path: &Path, bare: bool) -> CargoResult<()> {

src/cargo/sources/git/source.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct GitSource<'cfg> {
7373
source_id: SourceId,
7474
/// The underlying path source to discover packages inside the Git repository.
7575
path_source: Option<PathSource<'cfg>>,
76-
/// The identifer of this source for Cargo's Git cache directory.
76+
/// The identifier of this source for Cargo's Git cache directory.
7777
/// See [`ident`] for more.
7878
ident: String,
7979
config: &'cfg Config,

src/cargo/sources/git/utils.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<'a> GitCheckout<'a> {
264264
/// is done. Use [`GitCheckout::is_fresh`] to check.
265265
///
266266
/// * The `database` is where this checkout is from.
267-
/// * The `repo` will be the checked out Git repoistory.
267+
/// * The `repo` will be the checked out Git repository.
268268
fn new(
269269
database: &'a GitDatabase,
270270
revision: git2::Oid,
@@ -394,7 +394,7 @@ impl<'a> GitCheckout<'a> {
394394
fn update_submodules(&self, cargo_config: &Config) -> CargoResult<()> {
395395
return update_submodules(&self.repo, cargo_config, self.remote_url().as_str());
396396

397-
/// Recusive helper for [`GitCheckout::update_submodules`].
397+
/// Recursive helper for [`GitCheckout::update_submodules`].
398398
fn update_submodules(
399399
repo: &git2::Repository,
400400
cargo_config: &Config,
@@ -1086,7 +1086,7 @@ pub fn fetch(
10861086
debug!("fetch failed: {}", err);
10871087

10881088
if !repo_reinitialized.load(Ordering::Relaxed)
1089-
// We check for errors that could occour if the configuration, refs or odb files are corrupted.
1089+
// We check for errors that could occur if the configuration, refs or odb files are corrupted.
10901090
// We don't check for errors related to writing as `gitoxide` is expected to create missing leading
10911091
// folder before writing files into it, or else not even open a directory as git repository (which is
10921092
// also handled here).
@@ -1331,7 +1331,7 @@ fn clean_repo_temp_files(repo: &git2::Repository) {
13311331
}
13321332
}
13331333

1334-
/// Reinitializes a given Git repository. This is useful when a Git repoistory
1334+
/// Reinitializes a given Git repository. This is useful when a Git repository
13351335
/// seems corrupted and we want to start over.
13361336
fn reinitialize(repo: &mut git2::Repository) -> CargoResult<()> {
13371337
// Here we want to drop the current repository object pointed to by `repo`,

src/cargo/sources/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! The trait for sources of Cargo packages and its built-in implemetations.
1+
//! The trait for sources of Cargo packages and its built-in implementations.
22
//!
33
//! A source is a provider that contains source files and metadata of packages.
44
//! It provides a number of methods to fetch those package information, for

src/cargo/sources/registry/index.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ struct SummariesCache<'a> {
323323
/// A single line in the index representing a single version of a package.
324324
#[derive(Deserialize)]
325325
pub struct IndexPackage<'a> {
326-
/// Name of the pacakge.
326+
/// Name of the package.
327327
name: InternedString,
328328
/// The version of this dependency.
329329
vers: Version,
@@ -522,7 +522,7 @@ impl<'cfg> RegistryIndex<'cfg> {
522522
/// The actual kind index file being parsed depends on which kind of
523523
/// [`RegistryData`] the `load` argument is given. For example, a
524524
/// Git-based [`RemoteRegistry`] will first try a on-disk index cache
525-
/// file, and then try parsing registry raw index fomr Git repository.
525+
/// file, and then try parsing registry raw index from Git repository.
526526
///
527527
/// In effect, this is intended to be a quite cheap operation.
528528
///

src/cargo/sources/registry/remote.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub struct RemoteRegistry<'cfg> {
5959
/// A Git [tree object] to help this registry find crate metadata from the
6060
/// underlying Git repository.
6161
///
62-
/// This is stored here to prevent Git from repeatly creating a tree object
62+
/// This is stored here to prevent Git from repeatedly creating a tree object
6363
/// during each call into `load()`.
6464
///
6565
/// [tree object]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_tree_objects

src/cargo/util/config/key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl ConfigKey {
4949
/// equivalent to accessing a sub-table in TOML.
5050
///
5151
/// Note that this considers `name` to be case-insensitive, meaning that the
52-
/// corrseponding toml key is appended with this `name` as-is and the
52+
/// corresponding toml key is appended with this `name` as-is and the
5353
/// corresponding env key is appended with `name` after transforming it to
5454
/// uppercase characters.
5555
pub fn push(&mut self, name: &str) {

src/cargo/util/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub fn try_canonicalize<P: AsRef<Path>>(path: P) -> std::io::Result<PathBuf> {
161161

162162
// On Windows `canonicalize` may fail, so we fall back to getting an absolute path.
163163
std::fs::canonicalize(&path).or_else(|_| {
164-
// Return an error if a file does not exist for better compatiblity with `canonicalize`
164+
// Return an error if a file does not exist for better compatibility with `canonicalize`
165165
if !path.as_ref().try_exists()? {
166166
return Err(Error::new(ErrorKind::NotFound, "the path was not found"));
167167
}
@@ -224,7 +224,7 @@ pub fn get_umask() -> u32 {
224224
use std::sync::OnceLock;
225225
static UMASK: OnceLock<libc::mode_t> = OnceLock::new();
226226
// SAFETY: Syscalls are unsafe. Calling `umask` twice is even unsafer for
227-
// multithreading program, since it doesn't provide a way to retrive the
227+
// multithreading program, since it doesn't provide a way to retrieve the
228228
// value without modifications. We use a static `OnceLock` here to ensure
229229
// it only gets call once during the entire program lifetime.
230230
*UMASK.get_or_init(|| unsafe {

src/cargo/util/semver_ext.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ impl std::str::FromStr for PartialVersion {
244244
}
245245
Err(_) => anyhow::bail!("expected a version like \"1.32\""),
246246
};
247-
assert_eq!(version_req.comparators.len(), 1, "guarenteed by is_req");
247+
assert_eq!(version_req.comparators.len(), 1, "guaranteed by is_req");
248248
let comp = version_req.comparators.pop().unwrap();
249-
assert_eq!(comp.op, semver::Op::Caret, "guarenteed by is_req");
249+
assert_eq!(comp.op, semver::Op::Caret, "guaranteed by is_req");
250250
let pre = if comp.pre.is_empty() {
251251
None
252252
} else {

src/doc/man/cargo-metadata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for a Rust API for reading the metadata.
2727

2828
Within the same output format version, the compatibility is maintained, except
2929
some scenarios. The following is a non-exhaustive list of changes that are not
30-
considersed as incompatibile:
30+
considersed as incompatible:
3131

3232
* **Adding new fields** — New fields will be added when needed. Reserving this
3333
helps Cargo evolve without bumping the format version too often.

src/doc/man/generated_txt/cargo-metadata.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ OUTPUT FORMAT
2222
Compatibility
2323
Within the same output format version, the compatibility is maintained,
2424
except some scenarios. The following is a non-exhaustive list of changes
25-
that are not considersed as incompatibile:
25+
that are not considersed as incompatible:
2626

2727
o Adding new fields — New fields will be added when needed. Reserving
2828
this helps Cargo evolve without bumping the format version too often.

src/doc/src/commands/cargo-metadata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for a Rust API for reading the metadata.
2727

2828
Within the same output format version, the compatibility is maintained, except
2929
some scenarios. The following is a non-exhaustive list of changes that are not
30-
considersed as incompatibile:
30+
considersed as incompatible:
3131

3232
* **Adding new fields** — New fields will be added when needed. Reserving this
3333
helps Cargo evolve without bumping the format version too often.

src/doc/src/guide/continuous-integration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ When testing the latest versions some considerations are:
118118
- Rate of new dependencies being published
119119
- Level of risk a project is willing to accept
120120
- CI costs, including indirect costs like if a CI service has a maximum for
121-
parallel runners, causing new jobs to be serialized when at the maxium.
121+
parallel runners, causing new jobs to be serialized when at the maximum.
122122

123123
Some potential solutions include:
124124
- [Not checking in the `Cargo.lock`](../faq.md#why-have-cargolock-in-version-control)

src/doc/src/reference/registry-authentication.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Registry Authentication
22
Cargo authenticates to registries with through credential providers. These
33
credential providers are external executables or built-in providers that Cargo
4-
uses to store and retreive credentials.
4+
uses to store and retrieve credentials.
55

66
Using alternative registries with authentication *requires* a credential provider to be configured
77
to avoid unknowningly storing unecrypted credentials on disk. For historical reasons, public
@@ -54,7 +54,7 @@ may change in future Cargo releases (though there are currently no plans to do s
5454

5555
### `cargo:token`
5656
Uses Cargo's [credentials](config.md#credentials) file to store tokens unencrypted in plain text.
57-
When retreiving tokens, checks the `CARGO_REGISTRIES_<NAME>_TOKEN` environment variable.
57+
When retrieving tokens, checks the `CARGO_REGISTRIES_<NAME>_TOKEN` environment variable.
5858
If this credential provider is not listed, then the `*_TOKEN` environment variables will not work.
5959

6060
### `cargo:wincred`

src/etc/man/cargo-metadata.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ for a Rust API for reading the metadata.
2222
.SS "Compatibility"
2323
Within the same output format version, the compatibility is maintained, except
2424
some scenarios. The following is a non\-exhaustive list of changes that are not
25-
considersed as incompatibile:
25+
considersed as incompatible:
2626
.sp
2727
.RS 4
2828
\h'-04'\(bu\h'+02'\fBAdding new fields\fR \[em] New fields will be added when needed. Reserving this

tests/testsuite/cargo_new/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ mod inherit_workspace_package_table;
44
mod inherit_workspace_package_table_with_edition;
55
mod inherit_workspace_package_table_with_registry;
66
mod inherit_workspace_package_table_without_version;
7-
mod not_inherit_workspace_package_table_if_not_memebers;
7+
mod not_inherit_workspace_package_table_if_not_members;

0 commit comments

Comments
 (0)