Skip to content

Commit 371ee9d

Browse files
committed
fix: ensure patches are different dependencies to enable unused
1 parent a07a12a commit 371ee9d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/testsuite/cargo_remove/gc_patch/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ fn case() {
2323
})
2424
.url();
2525

26+
let git_project3 = git::new("bar3", |project| {
27+
project
28+
.file("Cargo.toml", &basic_manifest("bar", "0.1.0"))
29+
.file("src/lib.rs", "")
30+
})
31+
.url();
32+
2633
let in_project = project()
2734
.file(
2835
"Cargo.toml",
@@ -38,7 +45,7 @@ fn case() {
3845
bar = {{ git = \"{git_project1}\" }}\n\
3946
\n\
4047
[patch.\"{git_project1}\"]\n\
41-
bar = {{ git = \"{git_project2}\" }}\n\
48+
bar = {{ git = \"{git_project3}\" }}\n\
4249
\n\
4350
[patch.crates-io]\n\
4451
bar = {{ git = \"{git_project2}\" }}\n",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Removing bar from dependencies
2-
Updating git repository `[ROOTURL]/bar2`
2+
Updating git repository `[ROOTURL]/bar[..]`
33
Updating `dummy-registry` index

0 commit comments

Comments
 (0)