From 49de82cdca2064a909d3104f4e5eccacb0425fd0 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 10 Apr 2013 13:11:27 -0700 Subject: Issue #5656: Make &self not mean "&'self self" Fixes #5656. Fixes #5541. --- src/libsyntax/ext/base.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 92f0c7c7679..886af694920 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -454,6 +454,7 @@ impl MapChain{ // ugh: can't get this to compile with mut because of the // lack of flow sensitivity. + #[cfg(stage0)] fn get_map(&self) -> &'self HashMap { match *self { BaseMapChain (~ref map) => map, @@ -461,6 +462,18 @@ impl MapChain{ } } + // ugh: can't get this to compile with mut because of the + // lack of flow sensitivity. + #[cfg(stage1)] + #[cfg(stage2)] + #[cfg(stage3)] + fn get_map<'a>(&'a self) -> &'a HashMap { + match *self { + BaseMapChain (~ref map) => map, + ConsMapChain (~ref map,_) => map + } + } + // traits just don't work anywhere...? //pub impl Map for MapChain { -- cgit 1.4.1-3-g733a5