2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-02-25 01:27:20 -06:00
|
|
|
use std::io::{self, Write};
|
2014-11-07 14:18:08 -06:00
|
|
|
|
2019-05-28 13:47:21 -05:00
|
|
|
fn f(wr: &mut dyn Write) {
|
2015-02-25 01:27:20 -06:00
|
|
|
wr.write_all(b"hello").ok().expect("failed");
|
2014-11-07 14:18:08 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2022-07-06 21:36:10 -05:00
|
|
|
let mut wr = Box::new(io::stdout()) as Box<dyn Write>;
|
2014-11-07 14:18:08 -06:00
|
|
|
f(&mut wr);
|
|
|
|
}
|