]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/must-use-in-macro-55516.rs
Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr
[rust.git] / tests / ui / macros / must-use-in-macro-55516.rs
1 // check-pass
2 // compile-flags: -Wunused
3
4 // make sure write!() can't hide its unused Result
5
6 fn main() {
7     use std::fmt::Write;
8     let mut example = String::new();
9     write!(&mut example, "{}", 42); //~WARN must be used
10 }