pub fn path_to_local_with_projections(expr: &Expr<'_>) -> Option<HirId>
Expand description
If the expression is a path to a local (with optional projections),
returns the canonical HirId
of the local.
For example, x.field[0].field2
would return the HirId
of x
.