From b07c611bf1b9bf28ccce7bdb4b25a236d19f044f Mon Sep 17 00:00:00 2001 From: Kornel Date: Thu, 17 Oct 2024 11:14:51 +0100 Subject: [PATCH] Help with [patch.crates.io] --- src/cargo/util/toml/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index 85dcc1a0540..5b29c750937 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -1920,8 +1920,13 @@ fn patch( .or_else(|_| toml_url.into_url()) .with_context(|| { format!( - "[patch] entry `{}` should be a URL or registry name", - toml_url + "[patch] entry `{}` should be a URL or registry name{}", + toml_url, + if toml_url == "crates" { + "\nFor crates.io, use [patch.crates-io] (with a dash)" + } else { + "" + } ) })?, };