[–] ridiculous_fish 4y ago ↗ What if Unit<T> is an enum? Where do you put the PhantomData? [–] dwattttt 4y ago ↗ Superficially, you'd wrap the enum in a struct, and put the PhantomData there. I'm not sure that makes sense for this example though. [–] kangalioo 4y ago ↗ You could put it in any of the variants I think, or make a wrapper struct (like the other comment suggested). As long as the PhantomData comes up somewhere, it should be fine
[–] dwattttt 4y ago ↗ Superficially, you'd wrap the enum in a struct, and put the PhantomData there. I'm not sure that makes sense for this example though.
[–] kangalioo 4y ago ↗ You could put it in any of the variants I think, or make a wrapper struct (like the other comment suggested). As long as the PhantomData comes up somewhere, it should be fine
3 comments
[ 3.0 ms ] story [ 16.5 ms ] thread