rust/tests/ui/format_push_string_no_std.fixed
2025-12-25 23:24:43 +01:00

15 lines
341 B
Rust

#![warn(clippy::format_push_string)]
#![no_std]
extern crate alloc;
use alloc::format;
use alloc::string::String;
fn foo(string: &mut String) {
use core::fmt::Write;
// TODO: recognize the already imported `fmt::Write`, and don't suggest importing it again
let _ = write!(string, "{:?}", 1234);
//~^ format_push_string
}