Enum path inference with `_Variant` syntax

This is because you need to know the name and path of the enum, and type it out in full at least once. For enums that are used only once in a file (which I argue could be common), it doesn't do anything helpful.

init(.Turbo, .Encabulator, .Prefabulated)

gives a much nicer and shorter API than:

use enums::TurboEnum as T;
use enums::EncabulatorEnum as E;
use enums::PrefabEnum as P;
init(T::Enable, E::Enable, P::Enable)

Name lookup based on context is as useful as having method names. It's much nicer to have iter.map(x) instead of use std::iter::Iterator as I; I::map(iter, x).

4 Likes