2019-01-04 04:22:38 -06:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![warn(clippy::writeln_empty_string)]
|
|
|
|
use std::io::Write;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut v = Vec::new();
|
|
|
|
|
|
|
|
// These should fail
|
2022-01-27 08:12:45 -06:00
|
|
|
writeln!(v);
|
2019-01-04 04:22:38 -06:00
|
|
|
|
|
|
|
let mut suggestion = Vec::new();
|
2022-01-27 08:12:45 -06:00
|
|
|
writeln!(suggestion);
|
2019-01-04 04:22:38 -06:00
|
|
|
|
|
|
|
// These should be fine
|
2022-01-27 08:12:45 -06:00
|
|
|
writeln!(v);
|
|
|
|
writeln!(v, " ");
|
|
|
|
write!(v, "");
|
2019-01-04 04:22:38 -06:00
|
|
|
}
|