summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-02-05 12:29:45 -0500
committerAlex Crichton <alex@alexcrichton.com>2013-02-05 12:41:19 -0500
commitb368cb234126d1ada88ad5214102c68898eeffc7 (patch)
tree8d9f678bbfe0822d1e93848cfe1477421d27f5f1 /src/test
parent6a4483ec7a92bedab69b363aeeb6931b1bb5951f (diff)
downloadrust-b368cb234126d1ada88ad5214102c68898eeffc7.tar.gz
rust-b368cb234126d1ada88ad5214102c68898eeffc7.zip
Don't warn when imported traits are indeed used
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/unused-imports-warn.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/compile-fail/unused-imports-warn.rs b/src/test/compile-fail/unused-imports-warn.rs
index 52a9e1b38ff..6dcdb413f88 100644
--- a/src/test/compile-fail/unused-imports-warn.rs
+++ b/src/test/compile-fail/unused-imports-warn.rs
@@ -20,6 +20,11 @@ use core::util::*;              // shouldn't get errors for not using
 // Should only get one error instead of two errors here
 use core::option::{Some, None}; //~ ERROR unused import
 
+use core::io::ReaderUtil;       //~ ERROR unused import
+// Be sure that if we just bring some methods into scope that they're also
+// counted as being used.
+use core::io::WriterUtil;
+
 mod foo {
     pub struct Point{x: int, y: int}
     pub struct Square{p: Point, h: uint, w: uint}
@@ -37,4 +42,5 @@ fn main() {
     cal(foo::Point{x:3, y:9});
     let a = 3;
     ignore(a);
+    io::stdout().write_str(~"a");
 }