Closed
Description
Compiling
enum E {
A
}
impl E::A {}
Results in
tmp.rs:5:6: 5:10 error: inherent implementations may only be implemented in the same module as the type they are implemented for
tmp.rs:5 impl E::A {}
^~~~
error: aborting due to previous error
Which doesn't seem quite right...
Compiling
trait T {}
enum E {
A
}
impl T for E::A {}
fn main(){}
Results in
tmp.rs:7:12: 7:16 error: found value name used as a type: DefVariant(DefId { krate: 0, node: 7 }, DefId { krate: 0, node: 8 }, false)
tmp.rs:7 impl T for E::A {}
^~~~
Which, while being correct, is printing out compiler internals for no obvious reason...