1 Attempted to access a method like a field.
3 Erroneous code example:
15 f.method; // error: attempted to take value of method `method` on type `Foo`
18 If you want to use a method, add `()` after it:
21 # struct Foo { x: u32 }
22 # impl Foo { fn method(&self) {} }
23 # let f = Foo { x: 0 };
27 However, if you wanted to access a field of a struct check that the field name
28 is spelled correctly. Example:
31 # struct Foo { x: u32 }
32 # impl Foo { fn method(&self) {} }
33 # let f = Foo { x: 0 };