Add #![allow(print_literal)] to other test/ui/print_*.rs tests

This commit is contained in:
Michael Recachinas 2018-04-02 00:24:25 +01:00
parent 62220abfa6
commit ddd75fbfec
5 changed files with 21 additions and 19 deletions

View file

@ -1,5 +1,5 @@
#![allow(print_literal)]
#![warn(useless_format)]
fn main() {

View file

@ -1,5 +1,6 @@
#![allow(print_literal)]
#![warn(print_stdout, use_debug)]
use std::fmt::{Debug, Display, Formatter, Result};

View file

@ -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

View file

@ -1,5 +1,6 @@
#![allow(print_literal)]
#![warn(print_with_newline)]
fn main() {

View file

@ -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`