Closed
Description
I just spent far too long trying to figure out the problem with the following (reduced) code
struct X { i: isize }
impl X {
fn a(&self, i: usize)
{ }
fn b(&self)
{ a(self, 2) }
}
Which produces the error:
Checking playground v0.0.1 (/playground)
error[E0425]: cannot find function `a` in this scope
--> src/lib.rs:8:7
|
8 | { a(self, 2) }
| ^ not found in this scope
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
While I don't expect the code to compile, perhaps mention when trying to call a(self,...)
that I should be calling self.a(...)
?