Skip to main content

Module ref_field_expr

Module ref_field_expr 

Source
Expand description

This module contains a helper for converting a field access expression into a path expression. This is used when destructuring a tuple or struct.

It determines whether to deref the new expression and/or wrap it in parentheses, based on the parent of the existing expression.

Structsยง

RefData ๐Ÿ”’
Indicates whether to deref an expression or wrap it in parens

Functionsยง

determine_ref_and_parens ๐Ÿ”’
Decides whether the new path expression needs to be dereferenced and/or wrapped in parens. Returns the relevant parent expression to replace and the RefData.