Skip to content

Conversation

bkoropoff
Copy link
Contributor

The StrInterner::clear() method takes self immutably but can invalidate references returned by StrInterner::get_ref. Since get_ref is unused, just remove it.

Closes #17181

The string slices returned by `get_ref` can actually be
invalidated by calling `clear`.  Since this method is unused,
it is easiest to simply remove it.

Closes #17181
@bkoropoff
Copy link
Contributor Author

cc @sfackler

bors added a commit that referenced this pull request Sep 15, 2014
The `StrInterner::clear()` method takes self immutably but can invalidate references returned by `StrInterner::get_ref`. Since `get_ref` is unused, just remove it.

Closes #17181
@bors bors closed this Sep 15, 2014
@bors bors merged commit 26d716a into rust-lang:master Sep 15, 2014
@bkoropoff bkoropoff deleted the strinterner-unsafe branch September 20, 2014 21:21
lnicola pushed a commit to lnicola/rust that referenced this pull request May 19, 2024
internal: Lazier macro parse tree validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StrInterner exposes unsafe functions as safe
3 participants