Skip to content

Commit

Permalink
Auto merge of #5250 - rleungx:tweak-error-message, r=matklad
Browse files Browse the repository at this point in the history
tweak error message

Closes #5238.
  • Loading branch information
bors committed Mar 27, 2018
2 parents d079a10 + 967f094 commit 6b8d589
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cargo/ops/cargo_rustc/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,12 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
if ret.is_empty() {
if !unsupported.is_empty() {
bail!(
"cannot produce {} for `{}` as the target `{}` \
does not support these crate types",
unsupported.join(", "),
"cannot compile `{}` package, because target `{}` \
does not support the `{}` crate type{}",
unit.pkg,
self.target_triple()
self.target_triple(),
unsupported.join(", "),
if unsupported.len() == 1 { "" } else { "s" }
)
}
bail!(
Expand Down

0 comments on commit 6b8d589

Please sign in to comment.