Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b5c6127

Browse files
authoredSep 13, 2018
Combining HRTBs with associated types
I'm working on data-parallelism library, heavily inspired by Rayon but focused on describing certain computations on a dataset in an SQL-like manner, somewhat akin to Diesel. One part of this combines HRTBs with associated types. I've bumped into a few issues that have made things a bit tricky ([#30472](rust-lang/rust#30472), [#30867](rust-lang/rust#30867), [#53943](rust-lang/rust#53943), and similar), the hardest to work around however has been that I don't believe it's currently possible to write this: ```rust type Task = for<'a> <B as Abc<&'a A::Item>>::Task; ``` Currently I've resorted to a dummy trait, manually reimplemented on various structs without the reference, such that I can do: ```rust type Task = <B as AbcDummy<A::Item>>::Task; ``` and (horribly) transmute between the two. I'd be very interested to discuss 1) issues I've bumped into combining HRTBs and associated types; 2) how to get rid of this transmute and the dummy trait; 3) any feedback on the library before I publish and promote it, given it's heavily inspired by your work on Rayon! I can do any of the Monday or Friday times listed, though I have a preference for the 16 - 16.30 slots. Again, much appreciation for you doing this, I think it's awesome!
1 parent 16191c8 commit b5c6127

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎2018/09.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ Unassigned.
3636
Level: Any
3737
Time: 16 - 16:30 (UTC-4)
3838

39-
Unassigned.
39+
Alec Mocatta – Combining HRTBs with associated types<br/>
40+
(preferred) Email: alec@mocatta.net<br/>
41+
Discord: alecmocatta#8569<br/>
42+
Twitter: [@alecmocatta](https://twitter.com/alecmocatta)
4043

4144
**Monday, Sep 24.**
4245

0 commit comments

Comments
 (0)
Please sign in to comment.