From 967f0944a1ea9d2e2bcb37e12c9e01074ca720d2 Mon Sep 17 00:00:00 2001 From: rleungx Date: Tue, 27 Mar 2018 20:54:18 +0800 Subject: [PATCH] address comment --- src/cargo/ops/cargo_rustc/context/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/cargo_rustc/context/mod.rs b/src/cargo/ops/cargo_rustc/context/mod.rs index 1af18387d..2865e4842 100644 --- a/src/cargo/ops/cargo_rustc/context/mod.rs +++ b/src/cargo/ops/cargo_rustc/context/mod.rs @@ -761,10 +761,11 @@ impl<'a, 'cfg> Context<'a, 'cfg> { if !unsupported.is_empty() { bail!( "cannot compile `{}` package, because target `{}` \ - does not support the `{}` crate types", + does not support the `{}` crate type{}", unit.pkg, self.target_triple(), - unsupported.join(", ") + unsupported.join(", "), + if unsupported.len() == 1 { "" } else { "s" } ) } bail!( -- 2.30.2