summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-17322.rs
blob: b4fc40c3f2b7c376f20ac75dcbabca7dddea7115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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);
}