about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-17 05:06:27 -0700
committerbors <bors@rust-lang.org>2014-05-17 05:06:27 -0700
commit3da5a5cd18dc2a2177160772725946c3b4512f7c (patch)
treef54ec0e483ffe0f87253021187d4c86141aed9fa /src/libstd
parent20b502b2418c548a1ea47569784d07362780c8f4 (diff)
parent7cbec5566ce23701691a065866799f7057262acc (diff)
downloadrust-3da5a5cd18dc2a2177160772725946c3b4512f7c.tar.gz
rust-3da5a5cd18dc2a2177160772725946c3b4512f7c.zip
auto merge of #14253 : alexcrichton/rust/issue-14221, r=pcwalton
This plugs a leak where resolve was treating enums defined in parent modules as
in-scope for all children modules when resolving a pattern identifier. This
eliminates the code path in resolve entirely.

If this breaks any existing code, then it indicates that the variants need to be
explicitly imported into the module.

Closes #14221
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mem.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/mem.rs b/src/libstd/io/mem.rs
index 291b4f94841..92b546d5770 100644
--- a/src/libstd/io/mem.rs
+++ b/src/libstd/io/mem.rs
@@ -23,9 +23,9 @@ use vec::Vec;
 fn combine(seek: SeekStyle, cur: uint, end: uint, offset: i64) -> IoResult<u64> {
     // compute offset as signed and clamp to prevent overflow
     let pos = match seek {
-        SeekSet => 0,
-        SeekEnd => end,
-        SeekCur => cur,
+        io::SeekSet => 0,
+        io::SeekEnd => end,
+        io::SeekCur => cur,
     } as i64;
 
     if offset + pos < 0 {