Issue #5656: Make &self not mean "&'self self"
Fixes #5656. Fixes #5541.
This commit is contained in:
parent
3322595e89
commit
49de82cdca
16 changed files with 337 additions and 296 deletions
|
|
@ -454,6 +454,7 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
|
|||
|
||||
// ugh: can't get this to compile with mut because of the
|
||||
// lack of flow sensitivity.
|
||||
#[cfg(stage0)]
|
||||
fn get_map(&self) -> &'self HashMap<K,@V> {
|
||||
match *self {
|
||||
BaseMapChain (~ref map) => map,
|
||||
|
|
@ -461,6 +462,18 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
|
|||
}
|
||||
}
|
||||
|
||||
// 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<K,@V> {
|
||||
match *self {
|
||||
BaseMapChain (~ref map) => map,
|
||||
ConsMapChain (~ref map,_) => map
|
||||
}
|
||||
}
|
||||
|
||||
// traits just don't work anywhere...?
|
||||
//pub impl Map<Name,SyntaxExtension> for MapChain {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue