Closed
Description
pub struct S {
pub foo: u32,
}
impl S {
pub fn new() {
let x = foo;
}
}
The error message on 1.32 is:
error[E0425]: cannot find value `foo` in this scope
--> src/lib.rs:7:17
|
7 | let x = foo;
| ^^^
| |
| `self` value is a keyword only available in methods with `self` parameter
| help: try: `self.foo`
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7c3b9f4e90adb3db85bda29574102f77