diff options
| author | Murarth <murarth@gmail.com> | 2014-11-28 21:56:09 -0700 |
|---|---|---|
| committer | Murarth <murarth@gmail.com> | 2014-11-29 09:50:48 -0700 |
| commit | 004533ea755ecfc5d65e282366aaffc523e9632c (patch) | |
| tree | 6da61627cfc0439e7eb220413eceed153be01df2 /src/libsyntax/util | |
| parent | 29e928f2ba3501d37660314f6186d0e2ac18b9db (diff) | |
| download | rust-004533ea755ecfc5d65e282366aaffc523e9632c.tar.gz rust-004533ea755ecfc5d65e282366aaffc523e9632c.zip | |
Fix rustc panic on second compile_input
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/interner.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index ede967bba25..590a04ce221 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -214,6 +214,11 @@ impl StrInterner { *self.map.borrow_mut() = HashMap::new(); *self.vect.borrow_mut() = Vec::new(); } + + pub fn reset(&self, other: StrInterner) { + *self.map.borrow_mut() = other.map.into_inner(); + *self.vect.borrow_mut() = other.vect.into_inner(); + } } #[cfg(test)] |
