flux
flux copied to clipboard
Remove return type from variant specification
The only reason we need to check this is that we allow you to write the "return type" for a variant. If we instead had:
#[flux::refined_by(b: bool)]
enum Option<T> {
#[flux::variant([false])]
None,
#[flux::variant((T) -> [true])]
Some(T)
}
then, this wouldn't cause any problems. Not in this PR, but we should consider changing the syntax.
Originally posted by @nilehmann in https://github.com/flux-rs/flux/pull/586#discussion_r1437115186