summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/write_with_newline.stderr
blob: 2473329ca7276e149eb6702d32ea76c87de995c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:13:5
   |
LL |     write!(&mut v, "Hello/n");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::write-with-newline` implied by `-D warnings`
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "Hello");
   |     ^^^^^^^               --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:14:5
   |
LL |     write!(&mut v, "Hello {}/n", "world");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "Hello {}", "world");
   |     ^^^^^^^                  --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:15:5
   |
LL |     write!(&mut v, "Hello {} {}/n", "world", "#2");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "Hello {} {}", "world", "#2");
   |     ^^^^^^^                     --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:16:5
   |
LL |     write!(&mut v, "{}/n", 1265);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "{}", 1265);
   |     ^^^^^^^            --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:35:5
   |
LL |     write!(&mut v, "//n"); // should fail
   |     ^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "/"); // should fail
   |     ^^^^^^^            --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:42:5
   |
LL | /     write!(
LL | |         &mut v,
LL | |         "
LL | | "
LL | |     );
   | |_____^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(
LL |         &mut v,
LL |         ""
   |

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:47:5
   |
LL | /     write!(
LL | |         &mut v,
LL | |         r"
LL | | "
LL | |     );
   | |_____^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(
LL |         &mut v,
LL |         r""
   |

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:56:5
   |
LL |     write!(&mut v, "/r/n"); //~ ERROR
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "/r"); //~ ERROR
   |     ^^^^^^^             --

error: using `write!()` with a format string that ends in a single newline
  --> $DIR/write_with_newline.rs:57:5
   |
LL |     write!(&mut v, "foo/rbar/n");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: use `writeln!()` instead
   |
LL |     writeln!(&mut v, "foo/rbar");
   |     ^^^^^^^                  --

error: aborting due to 9 previous errors