Auto infer namespaces on struct and enum instantiations

I don't think it's ever made it to an RFC. Here's a recent discussion: Short enum variant syntax in some cases - #5 by scottmcm (with a link to the discussion before that...)

I've also pondered using . for it, kinda like Swift, to avoid it looking like "path elision" (which doesn't exist, and probably never should -- no std::_::Add, for example).

With that your example would then be

msg::Msg::ViewportMouse(.{ pos: MousePos, action: .Down })
3 Likes