Open yoshuawuyts opened 3 months ago
One small nit, but I don't think we should use the cfg
attribute for omitting fields here, since it would be a rather unprecedented way to use it-- it implies cfg(effect = effect)
is just a flag that can be checked throughout the program which is not the case. Perhaps a when(effect = effect)
and unless(effect = effect)
might be better.
Okay, yeah for sure we can change that to something different. You raise a good point that cfg
already means: "compile time evaluated" and so it makes sense not to change that meaning.
when
as a bound seems nice enough; happy to go with that in the draft. Thank you for raising this!
Adds a draft RFC for effect-generic types. This is the third in the series, and builds on the previous drafts for effect-generic trait declarations, and effect-generic bounds and functions.
The desugaring portion of this RFC on filing will be out of date. This still uses the older const-bool approach, which has since been replaced with the more potent const-enum approach in the compiler. We need to redraft the desugaring portions of all RFCs to make use of this new system, but we probably want to wait until Oli is back from PTO to do that. Even still tho: the desugaring in this RFC should still be sound, even if not ideal.
Thanks!