I am trying to parse a let statement like
let zero = <X as Default>::default();
According to the Rust reference ,
I am not sure if the
<X as Default>::default() should be parsed as a QualifiedPathInExpression or a QualifiedPathInType (or something else) ?
By definition, the right side of an "=" in a Let Statement should be an Expression, therefore I suspect this is should be an occurrence of QualifiedPathInExpression
However the call to
default() goes against my understanding of the QualifiedPathInExpression definition : its last part is expected to be a PathExprSegment which the
default() call is not.
Could any Rust grammarian help clarify how to parse this Let Statement or correct my understanding