tidy: println! -> eprintln!
This commit is contained in:
parent
23725619c4
commit
8374f7ceb5
4 changed files with 12 additions and 12 deletions
|
|
@ -38,7 +38,7 @@ const IGNORE_UI_TEST_CHECK: &[&str] =
|
|||
macro_rules! verbose_print {
|
||||
($verbose:expr, $($fmt:tt)*) => {
|
||||
if $verbose {
|
||||
println!("{}", format_args!($($fmt)*));
|
||||
eprintln!("{}", format_args!($($fmt)*));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -49,8 +49,8 @@ pub fn check(root_path: &Path, search_paths: &[&Path], verbose: bool, bad: &mut
|
|||
// Stage 1: create list
|
||||
let error_codes = extract_error_codes(root_path, &mut errors);
|
||||
if verbose {
|
||||
println!("Found {} error codes", error_codes.len());
|
||||
println!("Highest error code: `{}`", error_codes.iter().max().unwrap());
|
||||
eprintln!("Found {} error codes", error_codes.len());
|
||||
eprintln!("Highest error code: `{}`", error_codes.iter().max().unwrap());
|
||||
}
|
||||
|
||||
// Stage 2: check list has docs
|
||||
|
|
|
|||
|
|
@ -158,14 +158,14 @@ pub fn check(
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
for &(name, _) in gate_untested.iter() {
|
||||
println!("Expected a gate test for the feature '{name}'.");
|
||||
println!(
|
||||
eprintln!("Expected a gate test for the feature '{name}'.");
|
||||
eprintln!(
|
||||
"Hint: create a failing test file named 'tests/ui/feature-gates/feature-gate-{}.rs',\
|
||||
\n with its failures due to missing usage of `#![feature({})]`.",
|
||||
name.replace("_", "-"),
|
||||
name
|
||||
);
|
||||
println!(
|
||||
eprintln!(
|
||||
"Hint: If you already have such a test and don't want to rename it,\
|
||||
\n you can also add a // gate-test-{} line to the test file.",
|
||||
name
|
||||
|
|
@ -218,7 +218,7 @@ pub fn check(
|
|||
|
||||
lines.sort();
|
||||
for line in lines {
|
||||
println!("* {line}");
|
||||
eprintln!("* {line}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,16 +118,16 @@ pub fn check(path: &Path, features: CollectedFeatures, bad: &mut bool) {
|
|||
// List unstable features that don't have Unstable Book sections.
|
||||
// Remove the comment marker if you want the list printed.
|
||||
/*
|
||||
println!("Lib features without unstable book sections:");
|
||||
eprintln!("Lib features without unstable book sections:");
|
||||
for feature_name in &unstable_lang_feature_names -
|
||||
&unstable_book_lang_features_section_file_names {
|
||||
println!(" * {} {:?}", feature_name, lib_features[&feature_name].tracking_issue);
|
||||
eprintln!(" * {} {:?}", feature_name, lib_features[&feature_name].tracking_issue);
|
||||
}
|
||||
|
||||
println!("Lang features without unstable book sections:");
|
||||
eprintln!("Lang features without unstable book sections:");
|
||||
for feature_name in &unstable_lib_feature_names-
|
||||
&unstable_book_lib_features_section_file_names {
|
||||
println!(" * {} {:?}", feature_name, lang_features[&feature_name].tracking_issue);
|
||||
eprintln!(" * {} {:?}", feature_name, lang_features[&feature_name].tracking_issue);
|
||||
}
|
||||
// */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
|
|||
|
||||
if let Some(expected) = get_x_wrapper_version(root, cargo) {
|
||||
if installed < expected {
|
||||
return println!(
|
||||
return eprintln!(
|
||||
"Current version of x is {installed}, but the latest version is {expected}\nConsider updating to the newer version of x by running `cargo install --path src/tools/x`"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue