Skip to content

Commit 08bef9d

Browse files
committed
Auto merge of #10649 - Muscraft:fix-typos, r=epage
fix typos found by the `typos-cli` crate This fixes various typos inside `cargo`. They were found by [`typos-cli`](https://crates.io/crates/typos-cli). A few different typos were left out as they seemed either intentional or were needed. Typos found in `LICENSE-THIRD-PARTY` were left alone as well. r? `@epage`
2 parents dd53196 + cab6d30 commit 08bef9d

File tree

17 files changed

+33
-33
lines changed

17 files changed

+33
-33
lines changed

crates/cargo-util/src/paths.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub fn mtime_recursive(path: &Path) -> Result<FileTime> {
250250
// race with unlinking?). Regardless, if Cargo can't
251251
// read it, the build script probably can't either.
252252
log::debug!(
253-
"failed to determine mtime while fetching symlink metdata of {}: {}",
253+
"failed to determine mtime while fetching symlink metadata of {}: {}",
254254
e.path().display(),
255255
err
256256
);
@@ -541,7 +541,7 @@ fn _link_or_copy(src: &Path, dst: &Path) -> Result<()> {
541541
if cfg!(target_os = "macos") {
542542
// This is a work-around for a bug on macos. There seems to be a race condition
543543
// with APFS when hard-linking binaries. Gatekeeper does not have signing or
544-
// hash informations stored in kernel when running the process. Therefore killing it.
544+
// hash information stored in kernel when running the process. Therefore killing it.
545545
// This problem does not appear when copying files as kernel has time to process it.
546546
// Note that: fs::copy on macos is using CopyOnWrite (syscall fclonefileat) which should be
547547
// as fast as hardlinking.

crates/cargo-util/src/process_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl ProcessBuilder {
457457
Ok((cmd, tmp))
458458
}
459459

460-
/// Builds a command from `ProcessBuilder` for everythings but not `args`.
460+
/// Builds a command from `ProcessBuilder` for everything but not `args`.
461461
fn build_command_without_args(&self) -> Command {
462462
let mut command = {
463463
let mut iter = self.wrappers.iter().rev().chain(once(&self.program));

src/bin/cargo/commands/report.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn cli() -> App {
2525

2626
pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
2727
match args.subcommand() {
28-
Some(("future-incompatibilities", args)) => report_future_incompatibilies(config, args),
28+
Some(("future-incompatibilities", args)) => report_future_incompatibilities(config, args),
2929
Some((cmd, _)) => {
3030
unreachable!("unexpected command {}", cmd)
3131
}
@@ -35,7 +35,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
3535
}
3636
}
3737

38-
fn report_future_incompatibilies(config: &Config, args: &ArgMatches) -> CliResult {
38+
fn report_future_incompatibilities(config: &Config, args: &ArgMatches) -> CliResult {
3939
let ws = args.workspace(config)?;
4040
let reports = OnDiskReports::load(&ws)?;
4141
let id = args

src/cargo/core/compiler/fingerprint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ pub fn translate_dep_info(
18301830

18311831
// This is a bit of a tricky statement, but here we're *removing* the
18321832
// dependency on environment variables that were defined specifically for
1833-
// the command itself. Environment variables returend by `get_envs` includes
1833+
// the command itself. Environment variables returned by `get_envs` includes
18341834
// environment variables like:
18351835
//
18361836
// * `OUT_DIR` if applicable

src/cargo/core/compiler/timings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct Timings<'cfg> {
3030
start_str: String,
3131
/// A summary of the root units.
3232
///
33-
/// Tuples of `(package_description, target_descrptions)`.
33+
/// Tuples of `(package_description, target_descriptions)`.
3434
root_targets: Vec<(String, Vec<String>)>,
3535
/// The build profile.
3636
profile: String,

src/cargo/ops/cargo_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ impl CompileFilter {
802802
/// Constructs a filter that includes all test targets.
803803
///
804804
/// Being different from the behavior of [`CompileFilter::Default`], this
805-
/// function only recongnizes test targets, which means cargo might compile
805+
/// function only recognizes test targets, which means cargo might compile
806806
/// all targets with `tested` flag on, whereas [`CompileFilter::Default`]
807807
/// may include additional example targets to ensure they can be compiled.
808808
///

src/cargo/sources/registry/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl<'cfg> RegistryIndex<'cfg> {
409409
Poll::Ready(Ok(self.summaries_cache.get_mut(&name).unwrap()))
410410
}
411411

412-
/// Clears the in-memory summmaries cache.
412+
/// Clears the in-memory summaries cache.
413413
pub fn clear_summaries_cache(&mut self) {
414414
self.summaries_cache.clear();
415415
}

src/cargo/util/diagnostic_server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::core::Edition;
1818
use crate::util::errors::CargoResult;
1919
use crate::util::Config;
2020

21-
const DIAGNOSICS_SERVER_VAR: &str = "__CARGO_FIX_DIAGNOSTICS_SERVER";
21+
const DIAGNOSTICS_SERVER_VAR: &str = "__CARGO_FIX_DIAGNOSTICS_SERVER";
2222
const PLEASE_REPORT_THIS_BUG: &str =
2323
"This likely indicates a bug in either rustc or cargo itself,\n\
2424
and we would appreciate a bug report! You're likely to see \n\
@@ -63,7 +63,7 @@ pub enum Message {
6363
impl Message {
6464
pub fn post(&self) -> Result<(), Error> {
6565
let addr =
66-
env::var(DIAGNOSICS_SERVER_VAR).context("diagnostics collector misconfigured")?;
66+
env::var(DIAGNOSTICS_SERVER_VAR).context("diagnostics collector misconfigured")?;
6767
let mut client =
6868
TcpStream::connect(&addr).context("failed to connect to parent diagnostics target")?;
6969

@@ -240,7 +240,7 @@ impl RustfixDiagnosticServer {
240240
}
241241

242242
pub fn configure(&self, process: &mut ProcessBuilder) {
243-
process.env(DIAGNOSICS_SERVER_VAR, self.addr.to_string());
243+
process.env(DIAGNOSTICS_SERVER_VAR, self.addr.to_string());
244244
}
245245

246246
pub fn start<F>(self, on_message: F) -> Result<StartedServer, Error>

src/doc/src/reference/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ supported environment variables are:
8484
* `CARGO_BUILD_INCREMENTAL` — Incremental compilation, see [`build.incremental`].
8585
* `CARGO_BUILD_DEP_INFO_BASEDIR` — Dep-info relative directory, see [`build.dep-info-basedir`].
8686
* `CARGO_CARGO_NEW_VCS` — The default source control system with [`cargo new`], see [`cargo-new.vcs`].
87-
* `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY` - How often we should generate a future incompat report notifcation, see [`future-incompat-report.frequency`].
87+
* `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY` - How often we should generate a future incompat report notification, see [`future-incompat-report.frequency`].
8888
* `CARGO_HTTP_DEBUG` — Enables HTTP debugging, see [`http.debug`].
8989
* `CARGO_HTTP_PROXY` — Enables HTTP proxy, see [`http.proxy`].
9090
* `CARGO_HTTP_TIMEOUT` — The HTTP timeout, see [`http.timeout`].

src/doc/src/reference/unstable.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,9 @@ Keys that are supported:
12431243

12441244
Example:
12451245
```toml
1246-
# [PROGECT_DIR]/Cargo.toml
1246+
# [PROJECT_DIR]/Cargo.toml
12471247
[workspace]
1248-
memebers = ["bar"]
1248+
members = ["bar"]
12491249

12501250
[workspace.package]
12511251
version = "1.2.3"
@@ -1255,7 +1255,7 @@ documentation = "https://example.github.io/example"
12551255
```
12561256

12571257
```toml
1258-
# [PROGECT_DIR]/bar/Cargo.toml
1258+
# [PROGJCT_DIR]/bar/Cargo.toml
12591259
cargo-features = ["workspace-inheritance"]
12601260

12611261
[package]
@@ -1280,9 +1280,9 @@ You can then [inherit the workspace dependency as a package dependency][inheriti
12801280

12811281
Example:
12821282
```toml
1283-
# [PROGECT_DIR]/Cargo.toml
1283+
# [PROJECT_DIR]/Cargo.toml
12841284
[workspace]
1285-
memebers = ["bar"]
1285+
members = ["bar"]
12861286

12871287
[workspace.dependencies]
12881288
dep = { version = "0.1", features = ["fancy"] }
@@ -1291,7 +1291,7 @@ dep-dev = "0.5.2"
12911291
```
12921292

12931293
```toml
1294-
# [PROGECT_DIR]/bar/Cargo.toml
1294+
# [PROJECT_DIR]/bar/Cargo.toml
12951295
cargo-features = ["workspace-inheritance"]
12961296

12971297
[project]

tests/testsuite/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ fn found_multiple_target_files() {
23972397

23982398
p.cargo("build -v")
23992399
.with_status(101)
2400-
// Don't assert the inferred pathes since the order is non-deterministic.
2400+
// Don't assert the inferred paths since the order is non-deterministic.
24012401
.with_stderr(
24022402
"\
24032403
[ERROR] failed to parse manifest at `[..]`
@@ -5088,7 +5088,7 @@ fn same_metadata_different_directory() {
50885088
}
50895089

50905090
#[cargo_test]
5091-
fn building_a_dependent_crate_witout_bin_should_fail() {
5091+
fn building_a_dependent_crate_without_bin_should_fail() {
50925092
Package::new("testless", "0.1.0")
50935093
.file(
50945094
"Cargo.toml",

tests/testsuite/freshness.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ fn fingerprint_cleaner(mut dir: PathBuf, timestamp: filetime::FileTime) {
12561256
// So a cleaner can remove files associated with a fingerprint
12571257
// if all the files in the fingerprint's folder are older then a time stamp without
12581258
// effecting any builds that happened since that time stamp.
1259-
let mut cleand = false;
1259+
let mut cleaned = false;
12601260
dir.push(".fingerprint");
12611261
for fing in fs::read_dir(&dir).unwrap() {
12621262
let fing = fing.unwrap();
@@ -1270,12 +1270,12 @@ fn fingerprint_cleaner(mut dir: PathBuf, timestamp: filetime::FileTime) {
12701270
println!("remove: {:?}", fing.path());
12711271
// a real cleaner would remove the big files in deps and build as well
12721272
// but fingerprint is sufficient for our tests
1273-
cleand = true;
1273+
cleaned = true;
12741274
} else {
12751275
}
12761276
}
12771277
assert!(
1278-
cleand,
1278+
cleaned,
12791279
"called fingerprint_cleaner, but there was nothing to remove"
12801280
);
12811281
}

tests/testsuite/glob_targets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Tests for target filter flags rith glob patterns.
1+
//! Tests for target filter flags with glob patterns.
22
33
use cargo_test_support::{project, Project};
44

tests/testsuite/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ fn uninstall_multiple_and_specifying_bin() {
14281428
}
14291429

14301430
#[cargo_test]
1431-
fn uninstall_with_empty_pakcage_option() {
1431+
fn uninstall_with_empty_package_option() {
14321432
cargo_process("uninstall -p")
14331433
.with_status(101)
14341434
.with_stderr(

tests/testsuite/profile_targets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ fn profile_selection_check_all_targets_test() {
578578
// Pkg Target Profile Action Reason
579579
// --- ------ ------- ------ ------
580580
// bar lib test* link For bdep
581-
// bar lib test-panic metdata For tests/benches
581+
// bar lib test-panic metadata For tests/benches
582582
// bdep lib test* link For foo build.rs
583583
// foo custom test* link For build.rs
584584
//

tests/testsuite/publish_lockfile.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn lock_file_and_workspace() {
186186
#[cargo_test]
187187
fn note_resolve_changes() {
188188
// `multi` has multiple sources (path and registry).
189-
Package::new("mutli", "0.1.0").publish();
189+
Package::new("multi", "0.1.0").publish();
190190
// `updated` is always from registry, but should not change.
191191
Package::new("updated", "1.0.0").publish();
192192
// `patched` is [patch]ed.
@@ -200,7 +200,7 @@ fn note_resolve_changes() {
200200
"0.0.1",
201201
r#"
202202
[dependencies]
203-
mutli = { path = "mutli", version = "0.1" }
203+
multi = { path = "multi", version = "0.1" }
204204
updated = "1.0"
205205
patched = "1.0"
206206
@@ -210,8 +210,8 @@ fn note_resolve_changes() {
210210
),
211211
)
212212
.file("src/main.rs", "fn main() {}")
213-
.file("mutli/Cargo.toml", &basic_manifest("mutli", "0.1.0"))
214-
.file("mutli/src/lib.rs", "")
213+
.file("multi/Cargo.toml", &basic_manifest("multi", "0.1.0"))
214+
.file("multi/src/lib.rs", "")
215215
.file("patched/Cargo.toml", &basic_manifest("patched", "1.0.0"))
216216
.file("patched/src/lib.rs", "")
217217
.build();
@@ -230,7 +230,7 @@ fn note_resolve_changes() {
230230
[ARCHIVING] Cargo.toml.orig
231231
[ARCHIVING] src/main.rs
232232
[UPDATING] `[..]` index
233-
[NOTE] package `mutli v0.1.0` added to the packaged Cargo.lock file, was originally sourced from `[..]/foo/mutli`
233+
[NOTE] package `multi v0.1.0` added to the packaged Cargo.lock file, was originally sourced from `[..]/foo/multi`
234234
[NOTE] package `patched v1.0.0` added to the packaged Cargo.lock file, was originally sourced from `[..]/foo/patched`
235235
",
236236
)

tests/testsuite/workspaces.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ fn workspace_in_git() {
12211221
}
12221222

12231223
#[cargo_test]
1224-
fn lockfile_can_specify_nonexistant_members() {
1224+
fn lockfile_can_specify_nonexistent_members() {
12251225
let p = project()
12261226
.file(
12271227
"Cargo.toml",

0 commit comments

Comments
 (0)