]> git.lizzy.rs Git - rust.git/blob - tests/ui/write_with_newline.stderr
2baaea166d8ef189c094c195e58a19a63d1e75f3
[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    |
89
90 error: using `write!()` with a format string that ends in a single newline
91   --> $DIR/write_with_newline.rs:48:5
92    |
93 LL | /     write!(
94 LL | |         v,
95 LL | |         r"
96 LL | | "
97 LL | |     );
98    | |_____^
99    |
100 help: use `writeln!` instead
101    |
102 LL ~     writeln!(
103 LL ~         v
104    |
105
106 error: using `write!()` with a format string that ends in a single newline
107   --> $DIR/write_with_newline.rs:57:5
108    |
109 LL |     write!(v, "/r/n"); //~ ERROR
110    |     ^^^^^^^^^^^^^^^^^^
111    |
112 help: use `writeln!` instead
113    |
114 LL -     write!(v, "/r/n"); //~ ERROR
115 LL +     writeln!(v, "/r"); //~ ERROR
116    |
117
118 error: aborting due to 9 previous errors
119