diff --git a/tests/ui/format.rs b/tests/ui/format.rs index e9379d0a0..5e18b74bb 100644 --- a/tests/ui/format.rs +++ b/tests/ui/format.rs @@ -1,5 +1,5 @@ - +#![allow(print_literal)] #![warn(useless_format)] fn main() { diff --git a/tests/ui/print.rs b/tests/ui/print.rs index 91304d961..786398cfe 100644 --- a/tests/ui/print.rs +++ b/tests/ui/print.rs @@ -1,5 +1,6 @@ +#![allow(print_literal)] #![warn(print_stdout, use_debug)] use std::fmt::{Debug, Display, Formatter, Result}; diff --git a/tests/ui/print.stderr b/tests/ui/print.stderr index 789e1218b..457ed38a1 100644 --- a/tests/ui/print.stderr +++ b/tests/ui/print.stderr @@ -1,53 +1,53 @@ error: use of `Debug`-based formatting - --> $DIR/print.rs:12:27 + --> $DIR/print.rs:13:27 | -12 | write!(f, "{:?}", 43.1415) +13 | write!(f, "{:?}", 43.1415) | ^^^^^^^ | = note: `-D use-debug` implied by `-D warnings` error: use of `println!` - --> $DIR/print.rs:24:5 + --> $DIR/print.rs:25:5 | -24 | println!("Hello"); +25 | println!("Hello"); | ^^^^^^^^^^^^^^^^^^ | = note: `-D print-stdout` implied by `-D warnings` error: use of `print!` - --> $DIR/print.rs:25:5 + --> $DIR/print.rs:26:5 | -25 | print!("Hello"); +26 | print!("Hello"); | ^^^^^^^^^^^^^^^^ error: use of `print!` - --> $DIR/print.rs:27:5 + --> $DIR/print.rs:28:5 | -27 | print!("Hello {}", "World"); +28 | print!("Hello {}", "World"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `print!` - --> $DIR/print.rs:29:5 + --> $DIR/print.rs:30:5 | -29 | print!("Hello {:?}", "World"); +30 | print!("Hello {:?}", "World"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `Debug`-based formatting - --> $DIR/print.rs:29:26 + --> $DIR/print.rs:30:26 | -29 | print!("Hello {:?}", "World"); +30 | print!("Hello {:?}", "World"); | ^^^^^^^ error: use of `print!` - --> $DIR/print.rs:31:5 + --> $DIR/print.rs:32:5 | -31 | print!("Hello {:#?}", "#orld"); +32 | print!("Hello {:#?}", "#orld"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: use of `Debug`-based formatting - --> $DIR/print.rs:31:27 + --> $DIR/print.rs:32:27 | -31 | print!("Hello {:#?}", "#orld"); +32 | print!("Hello {:#?}", "#orld"); | ^^^^^^^ error: aborting due to 8 previous errors diff --git a/tests/ui/print_with_newline.rs b/tests/ui/print_with_newline.rs index 5cc50dea8..5445c8620 100644 --- a/tests/ui/print_with_newline.rs +++ b/tests/ui/print_with_newline.rs @@ -1,5 +1,6 @@ +#![allow(print_literal)] #![warn(print_with_newline)] fn main() { diff --git a/tests/ui/print_with_newline.stderr b/tests/ui/print_with_newline.stderr index 4f32d1b2a..5f2013e72 100644 --- a/tests/ui/print_with_newline.stderr +++ b/tests/ui/print_with_newline.stderr @@ -1,7 +1,7 @@ error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead - --> $DIR/print_with_newline.rs:6:5 + --> $DIR/print_with_newline.rs:7:5 | -6 | print!("Hello/n"); +7 | print!("Hello/n"); | ^^^^^^^^^^^^^^^^^^ | = note: `-D print-with-newline` implied by `-D warnings`