Closed
Description
The following code was my incorrect attempt to explicitly specialize a static method:
trait Test {
fn hello();
}
fn main() {
struct T;
impl Test for T {
fn hello() {}
}
T::hello();
}
In fact, apparently the fn is not yet possible to call at all. However, the error output is needlessly confusing with an error!() message and three errors:
!!! (resolving module in lexical scope) module wasn't actually a module!
/tmp/r.rs:10:4: 10:12 error: unresolved name
/tmp/r.rs:10 T::hello();
^~~~~~~~
/tmp/r.rs:10:4: 10:12 error: use of undeclared module `T`
/tmp/r.rs:10 T::hello();
^~~~~~~~
!!! (resolving module in lexical scope) module wasn't actually a module!
/tmp/r.rs:10:4: 10:12 error: unresolved name `T::hello`.
/tmp/r.rs:10 T::hello();
Metadata
Metadata
Assignees
Labels
No labels