mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-26 17:31:44 +00:00
Suppress "emit":"dep-info" json from syn-test-suite-feature-check
Previously: NOTE: use --release Syn's test suite has some tests that run on every source file and test case in the rust-lang/rust repo, which can be pretty slow in debug mode. Consider running cargo test with `--release` to speed things up. {"artifact":"/git/syn/target/debug/deps/syn_test_suite-695bcafef2321389.d","emit":"dep-info"}
This commit is contained in:
parent
1e8227295e
commit
dbc86fe1ed
@ -19,6 +19,7 @@ const FEATURES_ERROR: &str = ": use --all-features
|
||||
#[proc_macro]
|
||||
pub fn check(_input: TokenStream) -> TokenStream {
|
||||
let ref mut stderr = StandardStream::stderr(ColorChoice::Auto);
|
||||
let mut needs_newline = true;
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
let yellow = ColorSpec::new().set_fg(Some(Color::Yellow)).clone();
|
||||
@ -30,11 +31,15 @@ pub fn check(_input: TokenStream) -> TokenStream {
|
||||
_ = writeln!(stderr, "{}", line);
|
||||
}
|
||||
_ = stderr.reset();
|
||||
_ = writeln!(stderr);
|
||||
needs_newline = false;
|
||||
}
|
||||
|
||||
if cfg!(not(feature = "all-features")) {
|
||||
let red = ColorSpec::new().set_fg(Some(Color::Red)).clone();
|
||||
_ = writeln!(stderr);
|
||||
if needs_newline {
|
||||
_ = writeln!(stderr);
|
||||
}
|
||||
_ = stderr.set_color(red.clone().set_bold(true));
|
||||
_ = write!(stderr, "ERROR");
|
||||
for line in FEATURES_ERROR.lines() {
|
||||
@ -42,6 +47,7 @@ pub fn check(_input: TokenStream) -> TokenStream {
|
||||
_ = writeln!(stderr, "{}", line);
|
||||
}
|
||||
_ = stderr.reset();
|
||||
_ = writeln!(stderr);
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user