syn icon indicating copy to clipboard operation
syn copied to clipboard

Use PointerMutability inside Type::Ptr

Open dtolnay opened this issue 1 year ago • 0 comments

Currently, Expr::RawAddr is represented using PointerMutability enum:

https://github.com/dtolnay/syn/blob/da478ac46f202e69e7589c85123dcf8d0dde64be/src/expr.rs#L583-L589

whereas Type::Ptr is represented using separate Option<Token![const]> and Option<Token![mut]> fields.

https://github.com/dtolnay/syn/blob/da478ac46f202e69e7589c85123dcf8d0dde64be/src/ty.rs#L183-L188

dtolnay avatar Oct 19 '24 18:10 dtolnay