]> git.lizzy.rs Git - rust.git/blob - tests/ui/write_with_newline.stderr
a14e86122ee5d0b54c64d4d0aa48b7a0e0389da6
[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    |
19 help: use `writeln!()` instead
20    |
21 LL |     writeln!(&mut v, "Hello {}", "world");
22    |     ^^^^^^^                  --
23
24 error: using `write!()` with a format string that ends in a single newline
25   --> $DIR/write_with_newline.rs:15:5
26    |
27 LL |     write!(&mut v, "Hello {} {}/n", "world", "#2");
28    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29    |
30 help: use `writeln!()` instead
31    |
32 LL |     writeln!(&mut v, "Hello {} {}", "world", "#2");
33    |     ^^^^^^^                     --
34
35 error: using `write!()` with a format string that ends in a single newline
36   --> $DIR/write_with_newline.rs:16:5
37    |
38 LL |     write!(&mut v, "{}/n", 1265);
39    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40    |
41 help: use `writeln!()` instead
42    |
43 LL |     writeln!(&mut v, "{}", 1265);
44    |     ^^^^^^^            --
45
46 error: using `write!()` with a format string that ends in a single newline
47   --> $DIR/write_with_newline.rs:17:5
48    |
49 LL |     write!(&mut v, "/n");
50    |     ^^^^^^^^^^^^^^^^^^^^
51    |
52 help: use `writeln!()` instead
53    |
54 LL |     writeln!(&mut v, );
55    |     ^^^^^^^         --
56
57 error: using `write!()` with a format string that ends in a single newline
58   --> $DIR/write_with_newline.rs:36:5
59    |
60 LL |     write!(&mut v, "//n"); // should fail
61    |     ^^^^^^^^^^^^^^^^^^^^^^
62    |
63 help: use `writeln!()` instead
64    |
65 LL |     writeln!(&mut v, "/"); // should fail
66    |     ^^^^^^^            --
67
68 error: using `write!()` with a format string that ends in a single newline
69   --> $DIR/write_with_newline.rs:43:5
70    |
71 LL | /     write!(
72 LL | |         &mut v,
73 LL | |         "
74 LL | | "
75 LL | |     );
76    | |_____^
77    |
78 help: use `writeln!()` instead
79    |
80 LL |     writeln!(
81 LL |         &mut v,
82 LL |         ""
83    |
84
85 error: using `write!()` with a format string that ends in a single newline
86   --> $DIR/write_with_newline.rs:48:5
87    |
88 LL | /     write!(
89 LL | |         &mut v,
90 LL | |         r"
91 LL | | "
92 LL | |     );
93    | |_____^
94    |
95 help: use `writeln!()` instead
96    |
97 LL |     writeln!(
98 LL |         &mut v,
99 LL |         r""
100    |
101
102 error: using `write!()` with a format string that ends in a single newline
103   --> $DIR/write_with_newline.rs:57:5
104    |
105 LL |     write!(&mut v, "/r/n"); //~ ERROR
106    |     ^^^^^^^^^^^^^^^^^^^^^^^
107    |
108 help: use `writeln!()` instead
109    |
110 LL |     writeln!(&mut v, "/r"); //~ ERROR
111    |     ^^^^^^^             --
112
113 error: using `write!()` with a format string that ends in a single newline
114   --> $DIR/write_with_newline.rs:58:5
115    |
116 LL |     write!(&mut v, "foo/rbar/n");
117    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118    |
119 help: use `writeln!()` instead
120    |
121 LL |     writeln!(&mut v, "foo/rbar");
122    |     ^^^^^^^                  --
123
124 error: aborting due to 10 previous errors
125