Closed
Description
Suppose a type
declaration is used to provide a shorter name for a specific example of a generic struct
struct X<T>;
impl<T> X<T> {
fn go() -> int {-1}
}
struct A;
type Alias = X<A>;
then its not possible to call a static method via Alias
fn main() {
let a = X::<A>::go(); // Works
let b = Alias::go(); // Won't compile - error: failed to resolve. Use of undeclared module `Alias`
}
Should the compiler expand type
declarations in path expressions (ie Alias => X::<T>
)?
Metadata
Metadata
Assignees
Labels
No labels