2 ms·
Hm, the RFC says the braces are needed if it is not an "identity expression" with the examples: const X: usize = 7; let x: RectangularArray<i32, 2
by DougBTX 7y ago
Hm, the RFC says the braces are needed if it is not an "identity expression" with the examples:
const X: usize = 7;
let x: RectangularArray<i32, 2, 4>;
let y: RectangularArray<i32, X, {2 * 2}>;
So I'm still not sure if Color::Green is an identity expression, they say:
> Identity expression: An expression which cannot be evaluated further except by substituting it with names in scope. This includes all literals as well all idents
So... maybe? Depends on whether Color::Green is an ident or not. At the very least I'd expect this to work, but it doesn't yet:
use Color::*;
impl State<Green> { ... }
- fluffything 7y agoA name in scope is a path to a name, and Color::Green is also a path, so if impl<Green> works impl<Color::Green> would work as well.