diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/print.rs')
-rw-r--r-- | src/tools/clippy/tests/ui/print.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/print.rs b/src/tools/clippy/tests/ui/print.rs index 366ccc2b3..9ac4b51e1 100644 --- a/src/tools/clippy/tests/ui/print.rs +++ b/src/tools/clippy/tests/ui/print.rs @@ -9,6 +9,8 @@ struct Foo; impl Display for Foo { fn fmt(&self, f: &mut Formatter) -> Result { write!(f, "{:?}", 43.1415) + //~^ ERROR: use of `Debug`-based formatting + //~| NOTE: `-D clippy::use-debug` implied by `-D warnings` } } @@ -21,13 +23,21 @@ impl Debug for Foo { fn main() { println!("Hello"); + //~^ ERROR: use of `println!` + //~| NOTE: `-D clippy::print-stdout` implied by `-D warnings` print!("Hello"); + //~^ ERROR: use of `print!` print!("Hello {}", "World"); + //~^ ERROR: use of `print!` print!("Hello {:?}", "World"); + //~^ ERROR: use of `print!` + //~| ERROR: use of `Debug`-based formatting print!("Hello {:#?}", "#orld"); + //~^ ERROR: use of `print!` + //~| ERROR: use of `Debug`-based formatting assert_eq!(42, 1337); |