From eda013d3afd6311f1fd5bad56155d4ce7b76eb66 Mon Sep 17 00:00:00 2001 From: Devon Hollowood Date: Sat, 14 Oct 2017 21:42:14 -0300 Subject: [PATCH] Change lint filename suggest_print.rs -> explicit_write.rs --- .../src/{suggest_print.rs => explicit_write.rs} | 0 clippy_lints/src/lib.rs | 6 +++--- tests/ui/{suggest_print.rs => explicit_write.rs} | 0 .../{suggest_print.stderr => explicit_write.stderr} | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) rename clippy_lints/src/{suggest_print.rs => explicit_write.rs} (100%) rename tests/ui/{suggest_print.rs => explicit_write.rs} (100%) rename tests/ui/{suggest_print.stderr => explicit_write.stderr} (86%) diff --git a/clippy_lints/src/suggest_print.rs b/clippy_lints/src/explicit_write.rs similarity index 100% rename from clippy_lints/src/suggest_print.rs rename to clippy_lints/src/explicit_write.rs diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 8ea4aa351..a2878b864 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -145,7 +145,7 @@ pub mod serde_api; pub mod shadow; pub mod should_assert_eq; pub mod strings; -pub mod suggest_print; +pub mod explicit_write; pub mod swap; pub mod temporary_assignment; pub mod transmute; @@ -327,7 +327,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { reg.register_late_lint_pass(box unused_io_amount::UnusedIoAmount); reg.register_late_lint_pass(box large_enum_variant::LargeEnumVariant::new(conf.enum_variant_size_threshold)); reg.register_late_lint_pass(box should_assert_eq::ShouldAssertEq); - reg.register_late_lint_pass(box suggest_print::Pass); + reg.register_late_lint_pass(box explicit_write::Pass); reg.register_late_lint_pass(box needless_pass_by_value::NeedlessPassByValue); reg.register_early_lint_pass(box literal_digit_grouping::LiteralDigitGrouping); reg.register_late_lint_pass(box use_self::UseSelf); @@ -542,7 +542,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) { serde_api::SERDE_API_MISUSE, should_assert_eq::SHOULD_ASSERT_EQ, strings::STRING_LIT_AS_BYTES, - suggest_print::EXPLICIT_WRITE, + explicit_write::EXPLICIT_WRITE, swap::ALMOST_SWAPPED, swap::MANUAL_SWAP, temporary_assignment::TEMPORARY_ASSIGNMENT, diff --git a/tests/ui/suggest_print.rs b/tests/ui/explicit_write.rs similarity index 100% rename from tests/ui/suggest_print.rs rename to tests/ui/explicit_write.rs diff --git a/tests/ui/suggest_print.stderr b/tests/ui/explicit_write.stderr similarity index 86% rename from tests/ui/suggest_print.stderr rename to tests/ui/explicit_write.stderr index 12e656b55..9a813e897 100644 --- a/tests/ui/suggest_print.stderr +++ b/tests/ui/explicit_write.stderr @@ -1,5 +1,5 @@ error: use of `write!(stdout(), ...).unwrap()`. Consider using `print!` instead - --> $DIR/suggest_print.rs:16:9 + --> $DIR/explicit_write.rs:16:9 | 16 | write!(std::io::stdout(), "test").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -7,31 +7,31 @@ error: use of `write!(stdout(), ...).unwrap()`. Consider using `print!` instead = note: `-D explicit-write` implied by `-D warnings` error: use of `write!(stderr(), ...).unwrap()`. Consider using `eprint!` instead - --> $DIR/suggest_print.rs:17:9 + --> $DIR/explicit_write.rs:17:9 | 17 | write!(std::io::stderr(), "test").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `writeln!(stdout(), ...).unwrap()`. Consider using `println!` instead - --> $DIR/suggest_print.rs:18:9 + --> $DIR/explicit_write.rs:18:9 | 18 | writeln!(std::io::stdout(), "test").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `writeln!(stderr(), ...).unwrap()`. Consider using `eprintln!` instead - --> $DIR/suggest_print.rs:19:9 + --> $DIR/explicit_write.rs:19:9 | 19 | writeln!(std::io::stderr(), "test").unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `stdout().write_fmt(...).unwrap()`. Consider using `print!` instead - --> $DIR/suggest_print.rs:20:9 + --> $DIR/explicit_write.rs:20:9 | 20 | std::io::stdout().write_fmt(format_args!("test")).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `stderr().write_fmt(...).unwrap()`. Consider using `eprint!` instead - --> $DIR/suggest_print.rs:21:9 + --> $DIR/explicit_write.rs:21:9 | 21 | std::io::stderr().write_fmt(format_args!("test")).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^