]> git.lizzy.rs Git - rust.git/blob - tests/ui/write_with_newline.stderr
Merge remote-tracking branch 'upstream/rust-1.38.0' into backport_merge
[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:35:5
48    |
49 LL |     write!(&mut v, "//n"); // should fail
50    |     ^^^^^^^^^^^^^^^^^^^^^^
51    |
52 help: use `writeln!()` instead
53    |
54 LL |     writeln!(&mut v, "/"); // should fail
55    |     ^^^^^^^            --
56
57 error: using `write!()` with a format string that ends in a single newline
58   --> $DIR/write_with_newline.rs:42:5
59    |
60 LL | /     write!(
61 LL | |         &mut v,
62 LL | |         "
63 LL | | "
64 LL | |     );
65    | |_____^
66    |
67 help: use `writeln!()` instead
68    |
69 LL |     writeln!(
70 LL |         &mut v,
71 LL |         ""
72    |
73
74 error: using `write!()` with a format string that ends in a single newline
75   --> $DIR/write_with_newline.rs:47:5
76    |
77 LL | /     write!(
78 LL | |         &mut v,
79 LL | |         r"
80 LL | | "
81 LL | |     );
82    | |_____^
83    |
84 help: use `writeln!()` instead
85    |
86 LL |     writeln!(
87 LL |         &mut v,
88 LL |         r""
89    |
90
91 error: aborting due to 7 previous errors
92