blob: f6a7481f6422cdf9cec1d5b1b012caa84cd1493f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#![allow(unused_must_use)]
#![warn(clippy::writeln_empty_string)]
use std::io::Write;
fn main() {
let mut v = Vec::new();
// These should fail
writeln!(v);
let mut suggestion = Vec::new();
writeln!(suggestion);
// These should be fine
writeln!(v);
writeln!(v, " ");
write!(v, "");
}
|