Auto merge of #1616 - sbeckeriv:master, r=alexcrichton

This resolves #1379
This commit is contained in:
bors 2015-05-17 20:30:03 +00:00
commit ac61996f8d
3 changed files with 7 additions and 4 deletions

View file

@ -118,8 +118,9 @@ pub fn to_manifest(contents: &[u8],
None => {}
}
if !manifest.targets().iter().any(|t| !t.is_custom_build()) {
return Err(human(format!("either a [lib] or [[bin]] section must \
be present")))
return Err(human(format!("no targets specified in the manifest\n either \
src/lib.rs, src/main.rs, a [lib] section, or [[bin]] \
section must be present")))
}
return Ok((manifest, paths));

View file

@ -860,7 +860,8 @@ test!(missing_lib_and_bin {
failed to parse manifest at `[..]Cargo.toml`
Caused by:
either a [lib] or [[bin]] section must be present\n"));
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present\n"));
});
test!(lto_build {

View file

@ -953,7 +953,8 @@ test!(build_script_only {
failed to parse manifest at `[..]`
Caused by:
either a [lib] or [[bin]] section must be present"));
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present"));
});
test!(shared_dep_with_a_build_script {