X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fwrite_with_newline.stderr;h=2baaea166d8ef189c094c195e58a19a63d1e75f3;hb=b62319ce025b9a127f3d0f1217e3326418a38bb8;hp=a14e86122ee5d0b54c64d4d0aa48b7a0e0389da6;hpb=b08bbe50eac80607bd7e8a3d87d15cbf583ce989;p=rust.git diff --git a/tests/ui/write_with_newline.stderr b/tests/ui/write_with_newline.stderr index a14e86122ee..2baaea166d8 100644 --- a/tests/ui/write_with_newline.stderr +++ b/tests/ui/write_with_newline.stderr @@ -1,125 +1,119 @@ error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:13:5 | -LL | write!(&mut v, "Hello/n"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "Hello/n"); + | ^^^^^^^^^^^^^^^^^^^^ | = note: `-D clippy::write-with-newline` implied by `-D warnings` -help: use `writeln!()` instead +help: use `writeln!` instead + | +LL - write!(v, "Hello/n"); +LL + writeln!(v, "Hello"); | -LL | writeln!(&mut v, "Hello"); - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:14:5 | -LL | write!(&mut v, "Hello {}/n", "world"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "Hello {}/n", "world"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -help: use `writeln!()` instead +help: use `writeln!` instead + | +LL - write!(v, "Hello {}/n", "world"); +LL + writeln!(v, "Hello {}", "world"); | -LL | writeln!(&mut v, "Hello {}", "world"); - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:15:5 | -LL | write!(&mut v, "Hello {} {}/n", "world", "#2"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "Hello {} {}/n", "world", "#2"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: use `writeln!` instead | -help: use `writeln!()` instead +LL - write!(v, "Hello {} {}/n", "world", "#2"); +LL + writeln!(v, "Hello {} {}", "world", "#2"); | -LL | writeln!(&mut v, "Hello {} {}", "world", "#2"); - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:16:5 | -LL | write!(&mut v, "{}/n", 1265); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "{}/n", 1265); + | ^^^^^^^^^^^^^^^^^^^^^^^ + | +help: use `writeln!` instead | -help: use `writeln!()` instead +LL - write!(v, "{}/n", 1265); +LL + writeln!(v, "{}", 1265); | -LL | writeln!(&mut v, "{}", 1265); - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:17:5 | -LL | write!(&mut v, "/n"); - | ^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "/n"); + | ^^^^^^^^^^^^^^^ | -help: use `writeln!()` instead +help: use `writeln!` instead + | +LL - write!(v, "/n"); +LL + writeln!(v); | -LL | writeln!(&mut v, ); - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:36:5 | -LL | write!(&mut v, "//n"); // should fail - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | write!(v, "//n"); // should fail + | ^^^^^^^^^^^^^^^^^ + | +help: use `writeln!` instead | -help: use `writeln!()` instead +LL - write!(v, "//n"); // should fail +LL + writeln!(v, "/"); // should fail | -LL | writeln!(&mut v, "/"); // should fail - | ^^^^^^^ -- error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:43:5 | LL | / write!( -LL | | &mut v, +LL | | v, LL | | " LL | | " LL | | ); | |_____^ | -help: use `writeln!()` instead +help: use `writeln!` instead | -LL | writeln!( -LL | &mut v, -LL | "" +LL ~ writeln!( +LL ~ v | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:48:5 | LL | / write!( -LL | | &mut v, +LL | | v, LL | | r" LL | | " LL | | ); | |_____^ | -help: use `writeln!()` instead +help: use `writeln!` instead | -LL | writeln!( -LL | &mut v, -LL | r"" +LL ~ writeln!( +LL ~ v | error: using `write!()` with a format string that ends in a single newline --> $DIR/write_with_newline.rs:57:5 | -LL | write!(&mut v, "/r/n"); //~ ERROR - | ^^^^^^^^^^^^^^^^^^^^^^^ - | -help: use `writeln!()` instead - | -LL | writeln!(&mut v, "/r"); //~ ERROR - | ^^^^^^^ -- - -error: using `write!()` with a format string that ends in a single newline - --> $DIR/write_with_newline.rs:58:5 +LL | write!(v, "/r/n"); //~ ERROR + | ^^^^^^^^^^^^^^^^^^ | -LL | write!(&mut v, "foo/rbar/n"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: use `writeln!` instead | -help: use `writeln!()` instead +LL - write!(v, "/r/n"); //~ ERROR +LL + writeln!(v, "/r"); //~ ERROR | -LL | writeln!(&mut v, "foo/rbar"); - | ^^^^^^^ -- -error: aborting due to 10 previous errors +error: aborting due to 9 previous errors