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