Precedence in rust?


such as how to interpret



I tried to find the answer in the reference, but did not.


That example is the same as &(x[0].method()). There is an operator precedence section, I think it is correct to model the method-call . as a binary operator with the strongest precedence (i.e. above as).


Thanks. how about index? bind tightest I guess? the reference only talk about operator precedence. I did not find information about the method call and index precedence relative to operators. they often mix together.


I filed an issue about . missing from the precedence chart but apparently it’s not an operator. It still needs explaining somehow though. Precedence makes the most sense to me.

I was also told it should have highest precedence.