This commit is contained in:
Oliver Schneider 2016-05-27 15:42:33 +02:00
parent 0818e70497
commit e6a089efa9
No known key found for this signature in database
GPG Key ID: 56D6EEA0FC67AC46

View File

@ -1,6 +1,7 @@
// error-pattern:yummy // error-pattern:yummy
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(slice_patterns)]
extern crate rustc_driver; extern crate rustc_driver;
extern crate getopts; extern crate getopts;
@ -128,10 +129,11 @@ pub fn main() {
for target in metadata.packages.remove(0).targets { for target in metadata.packages.remove(0).targets {
let args = std::env::args().skip(2); let args = std::env::args().skip(2);
assert_eq!(target.kind.len(), 1); assert_eq!(target.kind.len(), 1);
match target.kind[0] { match &target.kind[..] {
cargo::Kind::dylib => process(std::iter::once("--lib".to_owned()).chain(args), &dep_path, &sys_root), [cargo::Kind::lib] |
cargo::Kind::bin => process(vec!["--bin".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root), [cargo::Kind::dylib] => process(std::iter::once("--lib".to_owned()).chain(args), &dep_path, &sys_root),
// don't process tests [cargo::Kind::bin] => process(vec!["--bin".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root),
// don't process tests and other stuff
_ => {}, _ => {},
} }
} }