Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added InternTable #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added InternTable #9

wants to merge 1 commit into from

Conversation

zesterer
Copy link

I was unable to use the macro for trait impls since it does not support lifetimes.

@droundy
Copy link
Owner

droundy commented Feb 28, 2020

This commit looks like it lacks documentation and tests. Both are needed for me to accept the pull request.

I think that I can see the goal, which is to enable arena allocated interned pointers. I think in this case you should be able to implement it without unsafe, though.

@zesterer
Copy link
Author

Yep, that's fair. I'll try to find some time to push this to completion over the next week.

@droundy
Copy link
Owner

droundy commented Jun 26, 2020

I've finally gotten around to taking a look at this, and it looks interesting. When I look at it, however, it seems like the borrow checker would prevent you from interning more than one object in a table, since the lifetime of the first entry would make the compiler think a borrow of the table is ongoing.

I haven't tested this, but it's worth putting in an example or test to demonstrate that it's not a problem.

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.

2 participants