error[E0599]: cannot write into `String` --> $DIR/missing-writer-issue-139830.rs:7:20 | LL | let _ = write!(buf, "foo"); | ^^^ | --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL | = note: the method is available for `String` here note: must implement `io::Write`, `fmt::Write`, or have a `write_fmt` method --> $DIR/missing-writer-issue-139830.rs:7:20 | LL | let _ = write!(buf, "foo"); | ^^^ = help: items from traits can only be used if the trait is in scope help: trait `Write` which provides `write_fmt` is implemented but not in scope; perhaps you want to import it | LL + use std::fmt::Write; | error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`.