gatify

Attribute Macro gatify 

Source
#[gatify]
Expand description

Rewrites std operators to use their GAT equivalents. Can be applied to any item or statement.

§Index

The [] operator is converted to use the ops::Index or ops::IndexMut trait. This may not always be a perfect drop-in replacement, despite the blanket impl for core::ops::Index - if the macro can’t tell which impl is expected from context, it will error out, pointing to the operator that caused the error.

§For Loops

For loops are converted to use either core::iter::Iterator or iter::Iterator, depending on which is implemented. If both are implemented, priority is given to the lending iterator.