Closed
Description
This code:
mod foo {}
fn main() {
let v = Vec::new();
v.push(foo);
}
produces these diagnostics:
<anon>:5:12: 5:15 error: unresolved name `foo` [E0425]
<anon>:5 v.push(foo);
^~~
<anon>:5:12: 5:15 help: see the detailed explanation for E0425
<anon>:5:12: 5:15 help: To call a function from the `foo` module, use `foo::push(..)`
The suggestion doesn't make sense -- we should instead emit something like "modules are not valid expressions".
Metadata
Metadata
Assignees
Labels
No labels