Skip to content

Commit b12bd38

Browse files
committed
Parse unsupported crate type error more tightly
This avoids issues when the target name contains the crate type, e.g. `bin` in `custom-bin-target.json`.
1 parent 59f50ab commit b12bd38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/build_context/target_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ fn parse_crate_type(
333333
) -> CargoResult<Option<(String, String)>> {
334334
let not_supported = error.lines().any(|line| {
335335
(line.contains("unsupported crate type") || line.contains("unknown crate type"))
336-
&& line.contains(crate_type)
336+
&& line.contains(&format!("crate type `{}`", crate_type))
337337
});
338338
if not_supported {
339339
return Ok(None);

0 commit comments

Comments
 (0)