rust/tests/ui/issues/issue-17322.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
243 B
Rust
Raw Normal View History

// run-pass
// pretty-expanded FIXME #23616
use std::io::{self, Write};
2019-05-28 13:47:21 -05:00
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);
}