Skip to content

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