mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
fix: ensure patches are different dependencies to enable unused
This commit is contained in:
parent
a07a12ac05
commit
dde256fb93
@ -23,6 +23,13 @@ fn case() {
|
||||
})
|
||||
.url();
|
||||
|
||||
let git_project3 = git::new("bar3", |project| {
|
||||
project
|
||||
.file("Cargo.toml", &basic_manifest("bar", "0.1.0"))
|
||||
.file("src/lib.rs", "")
|
||||
})
|
||||
.url();
|
||||
|
||||
let in_project = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
@ -38,7 +45,7 @@ fn case() {
|
||||
bar = {{ git = \"{git_project1}\" }}\n\
|
||||
\n\
|
||||
[patch.\"{git_project1}\"]\n\
|
||||
bar = {{ git = \"{git_project2}\" }}\n\
|
||||
bar = {{ git = \"{git_project3}\" }}\n\
|
||||
\n\
|
||||
[patch.crates-io]\n\
|
||||
bar = {{ git = \"{git_project2}\" }}\n",
|
||||
|
19
tests/testsuite/cargo_remove/gc_patch/out/Cargo.lock
generated
Normal file
19
tests/testsuite/cargo_remove/gc_patch/out/Cargo.lock
generated
Normal file
@ -0,0 +1,19 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "bar"
|
||||
version = "0.1.0"
|
||||
source = "git+[..]"
|
||||
|
||||
[[package]]
|
||||
name = "my-member"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bar",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "my-project"
|
||||
version = "0.1.0"
|
@ -1,3 +1,3 @@
|
||||
Removing bar from dependencies
|
||||
Updating git repository `[ROOTURL]/bar2`
|
||||
Updating git repository `[ROOTURL]/bar[..]`
|
||||
Updating `dummy-registry` index
|
||||
|
Loading…
x
Reference in New Issue
Block a user