mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
10 lines
255 B
Rust
10 lines
255 B
Rust
// 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`
|
|
}
|