Skip to content

Fake ToOwned trait#733

Open
clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:fake-to-owned
Open

Fake ToOwned trait#733
clarfonthey wants to merge 1 commit into
rust-lang:mainfrom
clarfonthey:fake-to-owned

Conversation

@clarfonthey

Copy link
Copy Markdown
Contributor

This follows one of the suggestions for removing the alloc dependency, specifically to allow moving HashMap into alloc: essentially, if we don't have ToOwned, store-bought is fine.

The expectation here is that specifically for libstd, they can implement a blanket forwarding of the actual ToOwned to this trait and it should work as expected. This is fine by coherence rules even though the coherence rules kind of don't make any more sense once you are libstd.

Not 100% sure if this should be merged immediately, since I want to make sure that we actually can get a full alloc-less version of hashbrown working first. But the implementation seems relatively straightforward.

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.

1 participant