about summary refs log tree commit diff
path: root/tests/ui/macros/missing-writer-issue-139830.rs
blob: da4608776c314d18d4438d9144a0a10ab531f612 (plain)
1
2
3
4
5
6
7
8
9
// Make sure we don't suggest a method change inside the `write!` macro.
//
// See <https://github.com/rust-lang/rust/issues/139830>

fn main() {
    let mut buf = String::new();
    let _ = write!(buf, "foo");
    //~^ ERROR cannot write into `String`
}