Skip to content

Commit 02f3694

Browse files
committed
tidy: println! -> eprintln!
1 parent 3515327 commit 02f3694

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/tools/tidy/src/deps.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,9 @@ fn check_license_exceptions(metadata: &Metadata, exceptions: &[(&str, &str)], ba
672672
}
673673
Some(pkg_license) => {
674674
if pkg_license.as_str() != *license {
675-
println!("dependency exception `{name}` license has changed");
676-
println!(" previously `{license}` now `{pkg_license}`");
677-
println!(" update EXCEPTIONS for the new license");
675+
eprintln!("dependency exception `{name}` license has changed");
676+
eprintln!(" previously `{license}` now `{pkg_license}`");
677+
eprintln!(" update EXCEPTIONS for the new license");
678678
*bad = true;
679679
}
680680
}

src/tools/tidy/src/error_codes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const IGNORE_UI_TEST_CHECK: &[&str] =
3838
macro_rules! verbose_print {
3939
($verbose:expr, $($fmt:tt)*) => {
4040
if $verbose {
41-
println!("{}", format_args!($($fmt)*));
41+
eprintln!("{}", format_args!($($fmt)*));
4242
}
4343
};
4444
}
@@ -49,8 +49,8 @@ pub fn check(root_path: &Path, search_paths: &[&Path], verbose: bool, bad: &mut
4949
// Stage 1: create list
5050
let error_codes = extract_error_codes(root_path, &mut errors);
5151
if verbose {
52-
println!("Found {} error codes", error_codes.len());
53-
println!("Highest error code: `{}`", error_codes.iter().max().unwrap());
52+
eprintln!("Found {} error codes", error_codes.len());
53+
eprintln!("Highest error code: `{}`", error_codes.iter().max().unwrap());
5454
}
5555

5656
// Stage 2: check list has docs

src/tools/tidy/src/features.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ pub fn check(
158158
.collect::<Vec<_>>();
159159

160160
for &(name, _) in gate_untested.iter() {
161-
println!("Expected a gate test for the feature '{name}'.");
162-
println!(
161+
eprintln!("Expected a gate test for the feature '{name}'.");
162+
eprintln!(
163163
"Hint: create a failing test file named 'tests/ui/feature-gates/feature-gate-{}.rs',\
164164
\n with its failures due to missing usage of `#![feature({})]`.",
165165
name.replace("_", "-"),
166166
name
167167
);
168-
println!(
168+
eprintln!(
169169
"Hint: If you already have such a test and don't want to rename it,\
170170
\n you can also add a // gate-test-{} line to the test file.",
171171
name
@@ -218,7 +218,7 @@ pub fn check(
218218

219219
lines.sort();
220220
for line in lines {
221-
println!("* {line}");
221+
eprintln!("* {line}");
222222
}
223223
}
224224

src/tools/tidy/src/unstable_book.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ pub fn check(path: &Path, features: CollectedFeatures, bad: &mut bool) {
118118
// List unstable features that don't have Unstable Book sections.
119119
// Remove the comment marker if you want the list printed.
120120
/*
121-
println!("Lib features without unstable book sections:");
121+
eprintln!("Lib features without unstable book sections:");
122122
for feature_name in &unstable_lang_feature_names -
123123
&unstable_book_lang_features_section_file_names {
124-
println!(" * {} {:?}", feature_name, lib_features[&feature_name].tracking_issue);
124+
eprintln!(" * {} {:?}", feature_name, lib_features[&feature_name].tracking_issue);
125125
}
126126
127-
println!("Lang features without unstable book sections:");
127+
eprintln!("Lang features without unstable book sections:");
128128
for feature_name in &unstable_lib_feature_names-
129129
&unstable_book_lib_features_section_file_names {
130-
println!(" * {} {:?}", feature_name, lang_features[&feature_name].tracking_issue);
130+
eprintln!(" * {} {:?}", feature_name, lang_features[&feature_name].tracking_issue);
131131
}
132132
// */
133133
}

src/tools/tidy/src/x_version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn check(root: &Path, cargo: &Path, bad: &mut bool) {
4242

4343
if let Some(expected) = get_x_wrapper_version(root, cargo) {
4444
if installed < expected {
45-
return println!(
45+
return eprintln!(
4646
"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`"
4747
);
4848
}

0 commit comments

Comments
 (0)