Elaborate on relative precedence between method calls and field accesses
Currently, the precedence table lists method calls higher than field accesses. Which gives the impression that for example a.b.c() is parsed as a.(b.c()) rather than the correct (a.b).c(). I don't know if that's an actual error in the table (seems unlikely?) or that the writers had a different interpretation in mind than I do. Either way, it would be useful to clarify how this is actually intended.
struct Foo { bar: Bar, }
impl Foo { fn get_bar(&self) -> &Bar { &self.bar } }
struct Bar;
impl Bar { fn greet(&self) { println!("Hello!"); } }
fn main() { let foo = Foo { bar: Bar }; foo.bar.greet(); // ✅ parsed as (foo.bar).greet() foo.get_bar().greet(); // ✅ method call then field access }