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:
David Tolnay 2022-11-22 22:47:12 -08:00
parent 1e8227295e
commit dbc86fe1ed
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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);
}