Trait constant inside struct field

Could you help me with this gist? Is this actually invalid code or a compiler bug? If it is invalid, why is it?

I think this is https://github.com/rust-lang/rust/issues/50308