Skip to content

Commit 80f9ec7

Browse files
committed
Auto merge of #1255 - silverjam:silverjam/improve-add-req-component-error, r=alexcrichton
Improve clarity of "adding req. component" error Fixes #1251.
2 parents 861eac9 + 13792a5 commit 80f9ec7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rustup/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ error_chain! {
5050
}
5151
AddingRequiredComponent(t: String, c: Component) {
5252
description("required component cannot be added")
53-
display("component {} is required for toolchain '{}' and cannot be re-added",
53+
display("component {} was automatically added because it is required for toolchain '{}'",
5454
c.description(), t)
5555
}
5656
ParsingSettings(e: Vec<toml::ParserError>) {

tests/cli-v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ fn add_target_host() {
565565
let trip = TargetTriple::from_build();
566566
expect_ok(config, &["rustup", "default", "nightly"]);
567567
expect_err(config, &["rustup", "target", "add", &trip.to_string()],
568-
for_host!("component 'rust-std' for target '{0}' is required for toolchain 'nightly-{0}' and cannot be re-added"));
568+
for_host!("component 'rust-std' for target '{0}' was automatically added because it is required for toolchain 'nightly-{0}'"));
569569
});
570570
}
571571

0 commit comments

Comments
 (0)