]> git.lizzy.rs Git - rust.git/blob - tests/ui/write_with_newline.stderr
Auto merge of #4136 - euclio:println-writeln-suggestions, r=flip1995
[rust.git] / tests / ui / write_with_newline.stderr
1 error: using `write!()` with a format string that ends in a single newline
2   --> $DIR/write_with_newline.rs:13:5
3    |
4 LL |     write!(&mut v, "Hello/n");
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::write-with-newline` implied by `-D warnings`
8 help: use `writeln!()` instead
9    |
10 LL |     writeln!(&mut v, "Hello");
11    |     ^^^^^^^               --
12
13 error: using `write!()` with a format string that ends in a single newline
14   --> $DIR/write_with_newline.rs:14:5
15    |
16 LL |     write!(&mut v, "Hello {}/n", "world");
17    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 help: use `writeln!()` instead
19    |
20 LL |     writeln!(&mut v, "Hello {}", "world");
21    |     ^^^^^^^                  --
22
23 error: using `write!()` with a format string that ends in a single newline
24   --> $DIR/write_with_newline.rs:15:5
25    |
26 LL |     write!(&mut v, "Hello {} {}/n", "world", "#2");
27    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 help: use `writeln!()` instead
29    |
30 LL |     writeln!(&mut v, "Hello {} {}", "world", "#2");
31    |     ^^^^^^^                     --
32
33 error: using `write!()` with a format string that ends in a single newline
34   --> $DIR/write_with_newline.rs:16:5
35    |
36 LL |     write!(&mut v, "{}/n", 1265);
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 help: use `writeln!()` instead
39    |
40 LL |     writeln!(&mut v, "{}", 1265);
41    |     ^^^^^^^            --
42
43 error: using `write!()` with a format string that ends in a single newline
44   --> $DIR/write_with_newline.rs:35:5
45    |
46 LL |     write!(&mut v, "//n"); // should fail
47    |     ^^^^^^^^^^^^^^^^^^^^^^
48 help: use `writeln!()` instead
49    |
50 LL |     writeln!(&mut v, "/"); // should fail
51    |     ^^^^^^^            --
52
53 error: using `write!()` with a format string that ends in a single newline
54   --> $DIR/write_with_newline.rs:42:5
55    |
56 LL | /     write!(
57 LL | |         &mut v,
58 LL | |         "
59 LL | | "
60 LL | |     );
61    | |_____^
62 help: use `writeln!()` instead
63    |
64 LL |     writeln!(
65 LL |         &mut v,
66 LL |         ""
67    |
68
69 error: using `write!()` with a format string that ends in a single newline
70   --> $DIR/write_with_newline.rs:47:5
71    |
72 LL | /     write!(
73 LL | |         &mut v,
74 LL | |         r"
75 LL | | "
76 LL | |     );
77    | |_____^
78 help: use `writeln!()` instead
79    |
80 LL |     writeln!(
81 LL |         &mut v,
82 LL |         r""
83    |
84
85 error: aborting due to 7 previous errors
86