Skip to content

Commit

Permalink
Auto merge of #12707 - epage:spell, r=ehuss
Browse files Browse the repository at this point in the history
chore: Fix typos

This is a repeat of #11561
  • Loading branch information
bors committed Sep 19, 2023
2 parents 808ffa9 + e4e10f2 commit f9335ba
Show file tree
Hide file tree
Showing 43 changed files with 49 additions and 49 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
[#10877](https://github.com/rust-lang/cargo/pull/10877)
- SemVer: It is not a breaking change to make an unsafe function safe.
[#12116](https://github.com/rust-lang/cargo/pull/12116)
- SemVer: changeing MSRV is generally a minor change.
- SemVer: changing MSRV is generally a minor change.
[#12122](https://github.com/rust-lang/cargo/pull/12122)
- Clarify when and how to `cargo yank`.
[#11862](https://github.com/rust-lang/cargo/pull/11862)
Expand Down Expand Up @@ -728,9 +728,9 @@

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

### Nightly only

- Implemented a inital support of asymmetric token authentication for registries.
- Implemented a initial support of asymmetric token authentication for registries.
([RFC 3231](https://github.com/rust-lang/rfcs/blob/master/text/3231-cargo-asymmetric-tokens.md))
([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#registry-auth))
[#10771](https://github.com/rust-lang/cargo/pull/10771)
Expand Down
2 changes: 1 addition & 1 deletion crates/crates-io/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub enum Error {
#[error(transparent)]
Curl(#[from] curl::Error),

/// Error from seriailzing the request payload and deserialzing the
/// Error from seriailzing the request payload and deserializing the
/// response body (like response body didn't match expected structure).
#[error(transparent)]
Json(#[from] serde_json::Error),
Expand Down
4 changes: 2 additions & 2 deletions crates/xtask-bump-check/src/xtask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn bump_check(args: &clap::ArgMatches, config: &cargo::util::Config) -> CargoRes
];

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

/// Checkouts a temporary workspace to do further version comparsions.
/// Checkouts a temporary workspace to do further version comparisons.
fn checkout_ws<'cfg, 'a>(
ws: &Workspace<'cfg>,
repo: &'a git2::Repository,
Expand Down
4 changes: 2 additions & 2 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ For more information, see issue #10049 <https://github.com/rust-lang/cargo/issue
} else {
config.shell().warn(format_args!(
"\
user-defined alias `{cmd}` has the appearance of a manfiest-command
user-defined alias `{cmd}` has the appearance of a manifest-command
This was previously accepted but will be phased out when `-Zscript` is stabilized.
For more information, see issue #12207 <https://github.com/rust-lang/cargo/issues/12207>."
))?;
Expand Down Expand Up @@ -449,7 +449,7 @@ impl Exec {
if !config.cli_unstable().script && ext_path.is_some() {
config.shell().warn(format_args!(
"\
external subcommand `{cmd}` has the appearance of a manfiest-command
external subcommand `{cmd}` has the appearance of a manifest-command
This was previously accepted but will be phased out when `-Zscript` is stabilized.
For more information, see issue #12207 <https://github.com/rust-lang/cargo/issues/12207>.",
))?;
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/context/compilation_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> {

/// Gets the metadata hash for the given [`Unit`].
///
/// Whne a metadata hash doesn't exist for the given unit,
/// When a metadata hash doesn't exist for the given unit,
/// this calls itself recursively to compute metadata hashes of all its dependencies.
/// See [`compute_metadata`] for how a single metadata hash is computed.
fn metadata_of<'a>(
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn emit_build_output(
///
/// The construction includes:
///
/// * Set environment varibles for the build script run.
/// * Set environment variables for the build script run.
/// * Create the output dir (`OUT_DIR`) for the build script output.
/// * Determine if the build script needs a re-run.
/// * Run the build script and store its output.
Expand Down Expand Up @@ -827,7 +827,7 @@ impl BuildOutput {
None => return false,
Some(n) => n,
};
// ALLOWED: the process of rustc boostrapping reads this through
// ALLOWED: the process of rustc bootstrapping reads this through
// `std::env`. We should make the behavior consistent. Also, we
// don't advertise this for bypassing nightly.
#[allow(clippy::disallowed_methods)]
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/fingerprint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ fn compare_old_fingerprint(

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

/// Calcuates the fingerprint of a unit thats contains no dep-info files.
/// Calculates the fingerprint of a unit thats contains no dep-info files.
fn pkg_fingerprint(bcx: &BuildContext<'_, '_>, pkg: &Package) -> CargoResult<String> {
let source_id = pkg.package_id().source_id();
let sources = bcx.packages.sources();
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
//! like what rustc has done[^1]. Also, no one knows if Cargo really needs that.
//! To be pragmatic, here we list a handful of items you may want to learn:
//!
//! * [`BuildContext`] is a static context containg all information you need
//! * [`BuildContext`] is a static context containing all information you need
//! before a build gets started.
//! * [`Context`] is the center of the world, coordinating a running build and
//! collecting information from it.
//! * [`custom_build`] is the home of build script executions and output parsing.
//! * [`fingerprint`] not only defines but also executes a set of rules to
//! determine if a re-compile is needed.
//! * [`job_queue`] is where the parallelism, job scheduling, and communication
//! machinary happen between Cargo and the compiler.
//! machinery happen between Cargo and the compiler.
//! * [`layout`] defines and manages output artifacts of a build in the filesystem.
//! * [`unit_dependencies`] is for building a dependency graph for compilation
//! from a result of dependency resolution.
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ pub fn channel() -> String {
if let Ok(override_channel) = env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS") {
return override_channel;
}
// ALLOWED: the process of rustc boostrapping reads this through
// ALLOWED: the process of rustc bootstrapping reads this through
// `std::env`. We should make the behavior consistent. Also, we
// don't advertise this for bypassing nightly.
#[allow(clippy::disallowed_methods)]
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl<'cfg> PackageRegistry<'cfg> {
// Note that this is somewhat subtle where the list of `ids` for a
// canonical URL is extend with possibly two ids per summary. This is done
// to handle the transition from the v2->v3 lock file format where in
// v2 DefeaultBranch was either DefaultBranch or Branch("master") for
// v2 DefaultBranch was either DefaultBranch or Branch("master") for
// git dependencies. In this case if `summary.package_id()` is
// Branch("master") then alt_package_id will be DefaultBranch. This
// signifies that there's a patch available for either of those
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! - <https://doc.rust-lang.org/nightly/nightly-rustc/cargo>: targeted at cargo contributors
//! - Updated on each update of the `cargo` submodule in `rust-lang/rust`
//!
//! **WARNING:** Using Cargo as a library has drawbacks, particulary the API is unstable,
//! **WARNING:** Using Cargo as a library has drawbacks, particularly the API is unstable,
//! and there is no clear path to stabilize it soon at the time of writing. See [The Cargo Book:
//! External tools] for more on this topic.
//!
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_output_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fn build_resolve_graph_r(
dep_kinds,
},
// No lib or artifact dep exists.
// Ususally this mean parent depending on non-lib bin crate.
// Usually this mean parent depending on non-lib bin crate.
(None, _) => continue,
};

Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! Apparently, the most important type in this module is [`GitSource`].
//! [`utils`] provides libgit2 utilities like fetch and checkout, whereas
//! [`oxide`] is the couterpart for gitoxide integration. [`known_hosts`]
//! [`oxide`] is the counterpart for gitoxide integration. [`known_hosts`]
//! is the mitigation of [CVE-2022-46176].
//!
//! [CVE-2022-46176]: https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/oxide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ pub fn cargo_config_to_gitoxide_overrides(config: &Config) -> CargoResult<Vec<BS
Ok(values)
}

/// Reinitializes a given Git repository. This is useful when a Git repoistory
/// Reinitializes a given Git repository. This is useful when a Git repository
/// seems corrupted and we want to start over.
pub fn reinitialize(git_dir: &Path) -> CargoResult<()> {
fn init(path: &Path, bare: bool) -> CargoResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub struct GitSource<'cfg> {
source_id: SourceId,
/// The underlying path source to discover packages inside the Git repository.
path_source: Option<PathSource<'cfg>>,
/// The identifer of this source for Cargo's Git cache directory.
/// The identifier of this source for Cargo's Git cache directory.
/// See [`ident`] for more.
ident: String,
config: &'cfg Config,
Expand Down
8 changes: 4 additions & 4 deletions src/cargo/sources/git/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl<'a> GitCheckout<'a> {
/// is done. Use [`GitCheckout::is_fresh`] to check.
///
/// * The `database` is where this checkout is from.
/// * The `repo` will be the checked out Git repoistory.
/// * The `repo` will be the checked out Git repository.
fn new(
database: &'a GitDatabase,
revision: git2::Oid,
Expand Down Expand Up @@ -394,7 +394,7 @@ impl<'a> GitCheckout<'a> {
fn update_submodules(&self, cargo_config: &Config) -> CargoResult<()> {
return update_submodules(&self.repo, cargo_config, self.remote_url().as_str());

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

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

/// Reinitializes a given Git repository. This is useful when a Git repoistory
/// Reinitializes a given Git repository. This is useful when a Git repository
/// seems corrupted and we want to start over.
fn reinitialize(repo: &mut git2::Repository) -> CargoResult<()> {
// Here we want to drop the current repository object pointed to by `repo`,
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! The trait for sources of Cargo packages and its built-in implemetations.
//! The trait for sources of Cargo packages and its built-in implementations.
//!
//! A source is a provider that contains source files and metadata of packages.
//! It provides a number of methods to fetch those package information, for
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/sources/registry/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ struct SummariesCache<'a> {
/// A single line in the index representing a single version of a package.
#[derive(Deserialize)]
pub struct IndexPackage<'a> {
/// Name of the pacakge.
/// Name of the package.
name: InternedString,
/// The version of this dependency.
vers: Version,
Expand Down Expand Up @@ -522,7 +522,7 @@ impl<'cfg> RegistryIndex<'cfg> {
/// The actual kind index file being parsed depends on which kind of
/// [`RegistryData`] the `load` argument is given. For example, a
/// Git-based [`RemoteRegistry`] will first try a on-disk index cache
/// file, and then try parsing registry raw index fomr Git repository.
/// file, and then try parsing registry raw index from Git repository.
///
/// In effect, this is intended to be a quite cheap operation.
///
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/registry/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct RemoteRegistry<'cfg> {
/// A Git [tree object] to help this registry find crate metadata from the
/// underlying Git repository.
///
/// This is stored here to prevent Git from repeatly creating a tree object
/// This is stored here to prevent Git from repeatedly creating a tree object
/// during each call into `load()`.
///
/// [tree object]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_tree_objects
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/config/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl ConfigKey {
/// equivalent to accessing a sub-table in TOML.
///
/// Note that this considers `name` to be case-insensitive, meaning that the
/// corrseponding toml key is appended with this `name` as-is and the
/// corresponding toml key is appended with this `name` as-is and the
/// corresponding env key is appended with `name` after transforming it to
/// uppercase characters.
pub fn push(&mut self, name: &str) {
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub fn try_canonicalize<P: AsRef<Path>>(path: P) -> std::io::Result<PathBuf> {

// On Windows `canonicalize` may fail, so we fall back to getting an absolute path.
std::fs::canonicalize(&path).or_else(|_| {
// Return an error if a file does not exist for better compatiblity with `canonicalize`
// Return an error if a file does not exist for better compatibility with `canonicalize`
if !path.as_ref().try_exists()? {
return Err(Error::new(ErrorKind::NotFound, "the path was not found"));
}
Expand Down Expand Up @@ -224,7 +224,7 @@ pub fn get_umask() -> u32 {
use std::sync::OnceLock;
static UMASK: OnceLock<libc::mode_t> = OnceLock::new();
// SAFETY: Syscalls are unsafe. Calling `umask` twice is even unsafer for
// multithreading program, since it doesn't provide a way to retrive the
// multithreading program, since it doesn't provide a way to retrieve the
// value without modifications. We use a static `OnceLock` here to ensure
// it only gets call once during the entire program lifetime.
*UMASK.get_or_init(|| unsafe {
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/util/semver_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ impl std::str::FromStr for PartialVersion {
}
Err(_) => anyhow::bail!("expected a version like \"1.32\""),
};
assert_eq!(version_req.comparators.len(), 1, "guarenteed by is_req");
assert_eq!(version_req.comparators.len(), 1, "guaranteed by is_req");
let comp = version_req.comparators.pop().unwrap();
assert_eq!(comp.op, semver::Op::Caret, "guarenteed by is_req");
assert_eq!(comp.op, semver::Op::Caret, "guaranteed by is_req");
let pre = if comp.pre.is_empty() {
None
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/cargo-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for a Rust API for reading the metadata.

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

* **Adding new fields** — New fields will be added when needed. Reserving this
helps Cargo evolve without bumping the format version too often.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/generated_txt/cargo-metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OUTPUT FORMAT
Compatibility
Within the same output format version, the compatibility is maintained,
except some scenarios. The following is a non-exhaustive list of changes
that are not considersed as incompatibile:
that are not considersed as incompatible:

o Adding new fields — New fields will be added when needed. Reserving
this helps Cargo evolve without bumping the format version too often.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for a Rust API for reading the metadata.

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

* **Adding new fields** — New fields will be added when needed. Reserving this
helps Cargo evolve without bumping the format version too often.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/guide/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ When testing the latest versions some considerations are:
- Rate of new dependencies being published
- Level of risk a project is willing to accept
- CI costs, including indirect costs like if a CI service has a maximum for
parallel runners, causing new jobs to be serialized when at the maxium.
parallel runners, causing new jobs to be serialized when at the maximum.

Some potential solutions include:
- [Not checking in the `Cargo.lock`](../faq.md#why-have-cargolock-in-version-control)
Expand Down
4 changes: 2 additions & 2 deletions src/doc/src/reference/registry-authentication.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Registry Authentication
Cargo authenticates to registries with through credential providers. These
credential providers are external executables or built-in providers that Cargo
uses to store and retreive credentials.
uses to store and retrieve credentials.

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

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

### `cargo:wincred`
Expand Down
2 changes: 1 addition & 1 deletion src/etc/man/cargo-metadata.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ for a Rust API for reading the metadata.
.SS "Compatibility"
Within the same output format version, the compatibility is maintained, except
some scenarios. The following is a non\-exhaustive list of changes that are not
considersed as incompatibile:
considersed as incompatible:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBAdding new fields\fR \[em] New fields will be added when needed. Reserving this
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_new/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mod inherit_workspace_package_table;
mod inherit_workspace_package_table_with_edition;
mod inherit_workspace_package_table_with_registry;
mod inherit_workspace_package_table_without_version;
mod not_inherit_workspace_package_table_if_not_memebers;
mod not_inherit_workspace_package_table_if_not_members;
Loading

0 comments on commit f9335ba

Please sign in to comment.