diff --git a/src/cargo/util/config/mod.rs b/src/cargo/util/config/mod.rs index 232ca27c0d2..b87f98afdf6 100644 --- a/src/cargo/util/config/mod.rs +++ b/src/cargo/util/config/mod.rs @@ -1548,7 +1548,10 @@ impl Config { ) }) } else { - bail!("no index found for registry: `{}`", registry); + bail!( + "registry index was not found in any configuration: `{}`", + registry + ); } } diff --git a/tests/testsuite/source_replacement.rs b/tests/testsuite/source_replacement.rs index ee2db71d8cf..41f3fe0b763 100644 --- a/tests/testsuite/source_replacement.rs +++ b/tests/testsuite/source_replacement.rs @@ -243,7 +243,7 @@ fn undefined_default() { .replace_crates_io(crates_io.index_url()) .with_status(101) .with_stderr( - "[ERROR] no index found for registry: `undefined` + "[ERROR] registry index was not found in any configuration: `undefined` ", ) .run();