Skip to content

Commit

Permalink
Change lint filename
Browse files Browse the repository at this point in the history
suggest_print.rs -> explicit_write.rs
  • Loading branch information
devonhollowood committed Oct 15, 2017
1 parent aeeb38d commit eda013d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions clippy_lints/src/lib.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions tests/ui/suggest_print.stderr → tests/ui/explicit_write.stderr
@@ -1,37 +1,37 @@
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();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit eda013d

Please sign in to comment.