about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-11-07 15:18:08 -0500
committerNiko Matsakis <niko@alum.mit.edu>2014-11-19 10:02:04 -0500
commitee9a7b60fab1198a43cf3bb991a93434f9a19e2c (patch)
treed9278fc29825822a867c51c4ab85b48203e77ae8 /src/test
parentcf7df1e6382e239619a8447719c3c19787d7b60d (diff)
downloadrust-ee9a7b60fab1198a43cf3bb991a93434f9a19e2c.tar.gz
rust-ee9a7b60fab1198a43cf3bb991a93434f9a19e2c.zip
Pass the unadjusted type into the unsize_info function, which seems to be what it expects. Fixes #17322.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-17322.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-17322.rs b/src/test/run-pass/issue-17322.rs
new file mode 100644
index 00000000000..c5784154a2e
--- /dev/null
+++ b/src/test/run-pass/issue-17322.rs
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::io;
+
+fn f(wr: &mut Writer) {
+    wr.write_str("hello").ok().expect("failed");
+}
+
+fn main() {
+    let mut wr = box io::stdout() as Box<Writer + 'static>;
+    f(&mut wr);
+}