From 13792a56a9854a3d1f630feba9795d9aaa5cc52f Mon Sep 17 00:00:00 2001 From: Jason Mobarak Date: Tue, 19 Sep 2017 22:25:59 -0700 Subject: [PATCH] Improve clarity of "adding req. component" error --- src/rustup/errors.rs | 2 +- tests/cli-v2.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rustup/errors.rs b/src/rustup/errors.rs index 1a60b6bd42..3366b00965 100644 --- a/src/rustup/errors.rs +++ b/src/rustup/errors.rs @@ -50,7 +50,7 @@ error_chain! { } AddingRequiredComponent(t: String, c: Component) { description("required component cannot be added") - display("component {} is required for toolchain '{}' and cannot be re-added", + display("component {} was automatically added because it is required for toolchain '{}'", c.description(), t) } ParsingSettings(e: Vec) { diff --git a/tests/cli-v2.rs b/tests/cli-v2.rs index eef6b0d3df..10a5f1ddc6 100644 --- a/tests/cli-v2.rs +++ b/tests/cli-v2.rs @@ -565,7 +565,7 @@ fn add_target_host() { let trip = TargetTriple::from_build(); expect_ok(config, &["rustup", "default", "nightly"]); expect_err(config, &["rustup", "target", "add", &trip.to_string()], - for_host!("component 'rust-std' for target '{0}' is required for toolchain 'nightly-{0}' and cannot be re-added")); + for_host!("component 'rust-std' for target '{0}' was automatically added because it is required for toolchain 'nightly-{0}'")); }); }