diff options
| author | bors <bors@rust-lang.org> | 2023-11-25 21:03:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-25 21:03:30 +0000 |
| commit | f5dc2653fdd8b5d177b2ccbd84057954340a89fc (patch) | |
| tree | 0c2859962e8aa2209780f2360f6e2d83f4b72c33 /src | |
| parent | ec1393f14efa179a968ec5b99c1ed62719198267 (diff) | |
| parent | 9b013bb3b8dc30b66f82feeb92be67e8aec7256f (diff) | |
| download | rust-f5dc2653fdd8b5d177b2ccbd84057954340a89fc.tar.gz rust-f5dc2653fdd8b5d177b2ccbd84057954340a89fc.zip | |
Auto merge of #118275 - weihanglo:update-cargo, r=ehuss
Update cargo 7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f 2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000 - feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996) - Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995) - try running on windows (rust-lang/cargo#13042) - refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021) - cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997) - Migrate rustfix to the cargo repo (rust-lang/cargo#13005) - typo: rusc -> rustc (rust-lang/cargo#13019) --- This also removes the check to ensure that `rustfix` between * src/tools/cargo * src/tools/compiletest has the same version, since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`. r? ghost
Diffstat (limited to 'src')
| m--------- | src/tools/cargo | 0 | ||||
| -rw-r--r-- | src/tools/tidy/src/deps.rs | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/src/tools/cargo b/src/tools/cargo -Subproject 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f +Subproject 9b13310ca596020a737aaa47daa4ed9ff8898a2 diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 10215520227..f36893bfb94 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -488,7 +488,6 @@ const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[ /// to the cargo executable. pub fn check(root: &Path, cargo: &Path, bad: &mut bool) { let mut checked_runtime_licenses = false; - let mut rust_metadata = None; for &(workspace, exceptions, permitted_deps) in WORKSPACES { if !root.join(workspace).join("Cargo.lock").exists() { @@ -512,15 +511,6 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) { let runtime_ids = compute_runtime_crates(&metadata); check_runtime_license_exceptions(&metadata, runtime_ids, bad); checked_runtime_licenses = true; - rust_metadata = Some(metadata); - } else if workspace == "src/tools/cargo" { - check_rustfix( - rust_metadata - .as_ref() - .expect("The root workspace should be the first to be checked"), - &metadata, - bad, - ); } } @@ -749,33 +739,3 @@ fn deps_of_filtered<'a>( deps_of_filtered(metadata, &dep.pkg, result, filter); } } - -fn direct_deps_of<'a>( - metadata: &'a Metadata, - pkg_id: &'a PackageId, -) -> impl Iterator<Item = &'a Package> { - let resolve = metadata.resolve.as_ref().unwrap(); - let node = resolve.nodes.iter().find(|n| &n.id == pkg_id).unwrap(); - node.deps.iter().map(|dep| pkg_from_id(metadata, &dep.pkg)) -} - -fn check_rustfix(rust_metadata: &Metadata, cargo_metadata: &Metadata, bad: &mut bool) { - let cargo = pkg_from_name(cargo_metadata, "cargo"); - let cargo_rustfix = - direct_deps_of(cargo_metadata, &cargo.id).find(|p| p.name == "rustfix").unwrap(); - - let compiletest = pkg_from_name(rust_metadata, "compiletest"); - let compiletest_rustfix = - direct_deps_of(rust_metadata, &compiletest.id).find(|p| p.name == "rustfix").unwrap(); - - if cargo_rustfix.version != compiletest_rustfix.version { - tidy_error!( - bad, - "cargo's rustfix version {} does not match compiletest's rustfix version {}\n\ - rustfix should be kept in sync, update the cargo side first, and then update \ - compiletest along with cargo.", - cargo_rustfix.version, - compiletest_rustfix.version - ); - } -} |
