diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-12-30 10:51:18 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-30 17:06:08 -0800 |
| commit | 6abfac083feafc73e5d736177755cce3bfb7153f (patch) | |
| tree | d5502fab0dd68ea96057616eb20d90a2c9050218 /src/libsyntax/ast_map | |
| parent | 6e1879eaf1cb5e727eb134a3e27018f7535852eb (diff) | |
| download | rust-6abfac083feafc73e5d736177755cce3bfb7153f.tar.gz rust-6abfac083feafc73e5d736177755cce3bfb7153f.zip | |
Fallout from stabilization
Diffstat (limited to 'src/libsyntax/ast_map')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 5a4f5731be5..b5395d09ca7 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -26,7 +26,7 @@ use arena::TypedArena; use std::cell::RefCell; use std::fmt; use std::io::IoResult; -use std::iter; +use std::iter::{mod, repeat}; use std::mem; use std::slice; @@ -726,7 +726,7 @@ impl<'ast> NodeCollector<'ast> { debug!("ast_map: {} => {}", id, entry); let len = self.map.len(); if id as uint >= len { - self.map.grow(id as uint - len + 1, NotPresent); + self.map.extend(repeat(NotPresent).take(id as uint - len + 1)); } self.map[id as uint] = entry; } |
