rust-lang/rust — pull request #17221 by bkoropoff (2014-09-13 04:10:10+00:00)
Title: Fix unsafety in StrInterner

The `StrInterner::clear()` method takes self immutably but can invalidate references returned by `StrInterner::get_ref`. Making it take `&mut self` would cause a lot of cascading code churn, so this PR adds a dynamic borrow check.

`get_ref` is actually unused, so an alternative fix would be to remove it altogether.

Closes #17181

r? @eddyb