Skip to content

Commit b07c611

Browse files
committed
Help with [patch.crates.io]
1 parent eaee77d commit b07c611

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/cargo/util/toml/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1920,8 +1920,13 @@ fn patch(
19201920
.or_else(|_| toml_url.into_url())
19211921
.with_context(|| {
19221922
format!(
1923-
"[patch] entry `{}` should be a URL or registry name",
1924-
toml_url
1923+
"[patch] entry `{}` should be a URL or registry name{}",
1924+
toml_url,
1925+
if toml_url == "crates" {
1926+
"\nFor crates.io, use [patch.crates-io] (with a dash)"
1927+
} else {
1928+
""
1929+
}
19251930
)
19261931
})?,
19271932
};

0 commit comments

Comments
 (0)