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/parse | |
| parent | 29e928f2ba3501d37660314f6186d0e2ac18b9db (diff) | |
| download | rust-004533ea755ecfc5d65e282366aaffc523e9632c.tar.gz rust-004533ea755ecfc5d65e282366aaffc523e9632c.zip | |
Fix rustc panic on second compile_input
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 583ace977fe..37df2bf14c2 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -564,6 +564,12 @@ pub fn get_ident_interner() -> Rc<IdentInterner> { KEY.with(|k| k.clone()) } +/// Reset the ident interner to its initial state. +pub fn reset_ident_interner() { + let interner = get_ident_interner(); + interner.reset(mk_fresh_ident_interner()); +} + /// Represents a string stored in the task-local interner. Because the /// interner lives for the life of the task, this can be safely treated as an /// immortal string, as long as it never crosses between tasks. |
