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