mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
13 lines
243 B
Rust
13 lines
243 B
Rust
// run-pass
|
|
// pretty-expanded FIXME #23616
|
|
|
|
use std::io::{self, Write};
|
|
|
|
fn f(wr: &mut dyn Write) {
|
|
wr.write_all(b"hello").ok().expect("failed");
|
|
}
|
|
|
|
fn main() {
|
|
let mut wr = Box::new(io::stdout()) as Box<dyn Write>;
|
|
f(&mut wr);
|
|
}
|