From 7cbec5566ce23701691a065866799f7057262acc Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 16 May 2014 15:44:14 -0700 Subject: rustc: Stop leaking enum variants into children 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 [breaking-change] --- src/libstd/io/mem.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd') 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 { // 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 { -- cgit 1.4.1-3-g733a5