From 34f2d4710bb90b04af211a18dc22ed05253d5be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 11 Dec 2019 15:31:26 +0100 Subject: [PATCH] fix a couple of typos --- src/bin/cargo/commands/vendor.rs | 4 ++-- src/cargo/core/compiler/fingerprint.rs | 2 +- src/cargo/core/compiler/mod.rs | 2 +- src/cargo/core/resolver/conflict_cache.rs | 2 +- src/cargo/core/resolver/context.rs | 2 +- src/cargo/core/resolver/dep_cache.rs | 2 +- src/cargo/core/resolver/errors.rs | 2 +- src/cargo/core/resolver/mod.rs | 4 ++-- src/cargo/ops/cargo_package.rs | 2 +- src/cargo/sources/registry/mod.rs | 2 +- src/cargo/util/lockserver.rs | 2 +- src/doc/src/reference/build-scripts.md | 2 +- src/doc/src/reference/environment-variables.md | 4 ++-- src/doc/src/reference/profiles.md | 2 +- tests/testsuite/package.rs | 4 ++-- tests/testsuite/publish.rs | 2 +- tests/testsuite/tool_paths.rs | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/bin/cargo/commands/vendor.rs b/src/bin/cargo/commands/vendor.rs index da0e5838562..7b07aa0da6f 100644 --- a/src/bin/cargo/commands/vendor.rs +++ b/src/bin/cargo/commands/vendor.rs @@ -68,7 +68,7 @@ to use the vendored sources, which you will need to add to `.cargo/config`. } pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { - // We're doing the vendoring operation outselves, so we don't actually want + // We're doing the vendoring operation ourselves, so we don't actually want // to respect any of the `source` configuration in Cargo itself. That's // intended for other consumers of Cargo, but we want to go straight to the // source, e.g. crates.io, to fetch crates. @@ -77,7 +77,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { } // When we moved `cargo vendor` into Cargo itself we didn't stabilize a few - // flags, so try to provide a helpful error message in that case to enusre + // flags, so try to provide a helpful error message in that case to ensure // that users currently using the flag aren't tripped up. let crates_io_cargo_vendor_flag = if args.is_present("no-merge-sources") { Some("--no-merge-sources") diff --git a/src/cargo/core/compiler/fingerprint.rs b/src/cargo/core/compiler/fingerprint.rs index 567c2cb071c..192c16e9dc6 100644 --- a/src/cargo/core/compiler/fingerprint.rs +++ b/src/cargo/core/compiler/fingerprint.rs @@ -123,7 +123,7 @@ //! if we tracked the actual values of modification times would cause //! unnecessary recompiles. To fix this we instead only track paths which are //! relevant. These paths are checked dynamically to see if they're up to -//! date, and the modifiation time doesn't make its way into the fingerprint +//! date, and the modification time doesn't make its way into the fingerprint //! hash. //! //! * Absolute path names. We strive to maintain a property where if you rename diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 36084e25e1f..f345820b1e7 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -727,7 +727,7 @@ fn build_base_args<'a, 'cfg>( if unit.mode.is_check() { cmd.arg("--emit=dep-info,metadata"); } else if !unit.requires_upstream_objects() { - // Always produce metdata files for rlib outputs. Metadata may be used + // Always produce metadata files for rlib outputs. Metadata may be used // in this session for a pipelined compilation, or it may be used in a // future Cargo session as part of a pipelined compile. cmd.arg("--emit=dep-info,metadata,link"); diff --git a/src/cargo/core/resolver/conflict_cache.rs b/src/cargo/core/resolver/conflict_cache.rs index 8f629114455..863a517f7ad 100644 --- a/src/cargo/core/resolver/conflict_cache.rs +++ b/src/cargo/core/resolver/conflict_cache.rs @@ -61,7 +61,7 @@ impl ConflictStoreTrie { if max_age > age { // we found one that can jump-back further so replace the out. out = Some((o, age)); - // and dont look at anything older + // and don't look at anything older max_age = age } } diff --git a/src/cargo/core/resolver/context.rs b/src/cargo/core/resolver/context.rs index 535583797ae..376d9b7751c 100644 --- a/src/cargo/core/resolver/context.rs +++ b/src/cargo/core/resolver/context.rs @@ -398,7 +398,7 @@ impl PublicDependency { // for each (transitive) parent that can newly see `t` let mut stack = vec![(parent, is_public)]; while let Some((p, public)) = stack.pop() { - // TODO: dont look at the same thing more then once + // TODO: don't look at the same thing more then once if let Some(o) = self.inner.get(&p).and_then(|x| x.get(&t.name())) { if o.0 != t { // the (transitive) parent can already see a different version by `t`s name. diff --git a/src/cargo/core/resolver/dep_cache.rs b/src/cargo/core/resolver/dep_cache.rs index aa33b1b0c64..75b10935ad6 100644 --- a/src/cargo/core/resolver/dep_cache.rs +++ b/src/cargo/core/resolver/dep_cache.rs @@ -234,7 +234,7 @@ impl<'a> RegistryQueryer<'a> { let out = Rc::new((used_features, Rc::new(deps))); // If we succeed we add the result to the cache so we can use it again next time. - // We dont cache the failure cases as they dont impl Clone. + // We don't cache the failure cases as they don't impl Clone. self.summary_cache .insert((parent, candidate.clone(), opts.clone()), out.clone()); diff --git a/src/cargo/core/resolver/errors.rs b/src/cargo/core/resolver/errors.rs index 823120e167b..369801eccde 100644 --- a/src/cargo/core/resolver/errors.rs +++ b/src/cargo/core/resolver/errors.rs @@ -271,7 +271,7 @@ pub(super) fn activation_error( ); if !candidates.is_empty() { // If dependency package name is equal to the name of the candidate here - // it may be a prerelease package which hasn't been speficied correctly + // it may be a prerelease package which hasn't been specified correctly if dep.package_name() == candidates[0].1.name() && candidates[0].1.package_id().version().is_prerelease() { diff --git a/src/cargo/core/resolver/mod.rs b/src/cargo/core/resolver/mod.rs index 85d107430d0..86947ca8efd 100644 --- a/src/cargo/core/resolver/mod.rs +++ b/src/cargo/core/resolver/mod.rs @@ -868,7 +868,7 @@ fn generalize_conflicting( let mut con = conflicting_activations.clone(); // It is always valid to combine previously inserted conflicts. // A, B are both known bad states each that can never be activated. - // A + B is redundant but cant be activated, as if + // A + B is redundant but can't be activated, as if // A + B is active then A is active and we know that is not ok. for (_, other) in &others { con.extend(other.iter().map(|(&id, re)| (id, re.clone()))); @@ -928,7 +928,7 @@ fn find_candidate( // If we backtracked we do not know how our `conflicting_activations` related to // the cause of that backtrack, so we do not update it. let age = if !backtracked { - // we dont have abnormal situations. So we can ask `cx` for how far back we need to go. + // we don't have abnormal situations. So we can ask `cx` for how far back we need to go. let a = cx.is_conflicting(Some(parent.package_id()), conflicting_activations); // If the `conflicting_activations` does not apply to `cx`, then something went very wrong // in building it. But we will just fall back to laboriously trying all possibilities witch diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index b6e653a8b7f..4fb1bfe4d36 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -324,7 +324,7 @@ fn check_repo_state( failure::bail!( "{} files in the working directory contain changes that were \ not yet committed into git:\n\n{}\n\n\ - to proceed despite this and include the uncommited changes, pass the `--allow-dirty` flag", + to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag", dirty.len(), dirty.join("\n") ) diff --git a/src/cargo/sources/registry/mod.rs b/src/cargo/sources/registry/mod.rs index dc543caef01..eb04af592aa 100644 --- a/src/cargo/sources/registry/mod.rs +++ b/src/cargo/sources/registry/mod.rs @@ -47,7 +47,7 @@ //! //! Additionally, each modification to the index is just appending a line at //! the end of a file (the exact format is described later). This means that -//! the commits for an index are quite small and easily applied/compressable. +//! the commits for an index are quite small and easily applied/compressible. //! //! ## The format of the Index //! diff --git a/src/cargo/util/lockserver.rs b/src/cargo/util/lockserver.rs index 9c4878dfc14..266b69a836e 100644 --- a/src/cargo/util/lockserver.rs +++ b/src/cargo/util/lockserver.rs @@ -2,7 +2,7 @@ //! //! This module implements a locking server/client where the main `cargo fix` //! process will start up a server and then all the client processes will -//! connect to it. The main purpose of this file is to enusre that each crate +//! connect to it. The main purpose of this file is to ensure that each crate //! (aka file entry point) is only fixed by one process at a time, currently //! concurrent fixes can't happen. //! diff --git a/src/doc/src/reference/build-scripts.md b/src/doc/src/reference/build-scripts.md index e8d5d9854ff..4800e229cc7 100644 --- a/src/doc/src/reference/build-scripts.md +++ b/src/doc/src/reference/build-scripts.md @@ -42,7 +42,7 @@ scripts. Just before a package is built, Cargo will compile a build script into an executable (if it has not already been built). It will then run the script, which may perform any number of tasks. The script may communicate with Cargo -by printing specially formated commands prefixed with `cargo:` to stdout. +by printing specially formatted commands prefixed with `cargo:` to stdout. The build script will be rebuilt if any of its source files or dependencies change. diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index df057fa8766..4eedc491eae 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -236,7 +236,7 @@ let out_dir = env::var("OUT_DIR").unwrap(); * `CARGO_CFG_TARGET_VENDOR=apple` — The [target vendor]. * `CARGO_CFG_TARGET_ENV=gnu` — The [target environment] ABI. * `CARGO_CFG_TARGET_POINTER_WIDTH=64` — The CPU [pointer width]. - * `CARGO_CFG_TARGET_ENDIAN=little` — The CPU [target endianess]. + * `CARGO_CFG_TARGET_ENDIAN=little` — The CPU [target endianness]. * `CARGO_CFG_TARGET_FEATURE=mmx,sse` — List of CPU [target features] enabled. * `OUT_DIR` - the folder in which all output should be placed. This folder is inside the build directory for the package being built, and it is @@ -276,7 +276,7 @@ let out_dir = env::var("OUT_DIR").unwrap(); [target vendor]: ../../reference/conditional-compilation.html#target_vendor [target environment]: ../../reference/conditional-compilation.html#target_env [pointer width]: ../../reference/conditional-compilation.html#target_pointer_width -[target endianess]: ../../reference/conditional-compilation.html#target_endian +[target endianness]: ../../reference/conditional-compilation.html#target_endian [target features]: ../../reference/conditional-compilation.html#target_feature [links]: build-scripts.md#the-links-manifest-key [configuration]: ../../reference/conditional-compilation.html diff --git a/src/doc/src/reference/profiles.md b/src/doc/src/reference/profiles.md index 67c05bc1fb2..88f01800b64 100644 --- a/src/doc/src/reference/profiles.md +++ b/src/doc/src/reference/profiles.md @@ -187,7 +187,7 @@ case `rustc` uses an internal heuristic to split the crate. #### rpath -The `rpath` setting controlls the [`-C rpath` flag] which controls +The `rpath` setting controls the [`-C rpath` flag] which controls whether or not [`rpath`] is enabled. [`-C rpath` flag]: ../../rustc/codegen-options/index.html#rpath diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index 811642afa39..94751fab3e8 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -758,7 +758,7 @@ Caused by: } #[cargo_test] -/// Tests if a symlink to a directory is proberly included. +/// Tests if a symlink to a directory is properly included. /// /// This test requires you to be able to make symlinks. /// For windows, this may require you to enable developer mode. @@ -824,7 +824,7 @@ committed into git: Cargo.toml -to proceed despite this and include the uncommited changes, pass the `--allow-dirty` flag +to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag ", ) .run(); diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index 99dc98206d3..5287f040f71 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -399,7 +399,7 @@ committed into git: bar -to proceed despite this and include the uncommited changes, pass the `--allow-dirty` flag +to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag ", ) .run(); diff --git a/tests/testsuite/tool_paths.rs b/tests/testsuite/tool_paths.rs index 956c83adfd5..5b4d72bde0a 100644 --- a/tests/testsuite/tool_paths.rs +++ b/tests/testsuite/tool_paths.rs @@ -204,7 +204,7 @@ fn custom_runner_cfg() { .run(); } -// custom runner set via `target.$triple.runner` have precende over `target.'cfg(..)'.runner` +// custom runner set via `target.$triple.runner` have precedence over `target.'cfg(..)'.runner` #[cargo_test] fn custom_runner_cfg_precedence() { let target = rustc_host();