Skip to content

Commit

Permalink
Auto merge of rust-lang#10968 - hi-rustin:rustin-patch-msg, r=ehuss
Browse files Browse the repository at this point in the history
Improve error msg for get target runner

Actually, we'll get this config from three places. So this msg may be confusing when you set it up in `.cargo/config.toml` or pass it by `--config`.
We already printed the location of the config, so I think it's OK to change it to `configurations`.
  • Loading branch information
bors committed Aug 11, 2022
2 parents a120cfe + 6bb4050 commit 1ac43cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ fn target_runner(
let matching_runner = cfgs.next();
if let Some((key, runner)) = cfgs.next() {
anyhow::bail!(
"several matching instances of `target.'cfg(..)'.runner` in `.cargo/config`\n\
"several matching instances of `target.'cfg(..)'.runner` in configurations\n\
first match `{}` located in {}\n\
second match `{}` located in {}",
matching_runner.unwrap().0,
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/tool_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ fn custom_runner_cfg_collision() {
.with_status(101)
.with_stderr(
"\
[ERROR] several matching instances of `target.'cfg(..)'.runner` in `.cargo/config`
[ERROR] several matching instances of `target.'cfg(..)'.runner` in configurations
first match `cfg(not(target_arch = \"avr\"))` located in [..]/foo/.cargo/config
second match `cfg(not(target_os = \"none\"))` located in [..]/foo/.cargo/config
",
Expand Down

0 comments on commit 1ac43cf

Please sign in to comment.