Previously the formatter was inserting an extra < when formatting functions with a space before < when specifying generics. We currently mark the starting span for a list of generics as the end of the function name. Having this be the starting span would cause the first generic of the sequence to have < marked as a leading string when it should not have been. We now start the span for a function's generics by looking for < rather than starting the span at the end of the function name.
Additional Context
Documentation*
Check one:
[X] No documentation needed.
[ ] Documentation included in this PR.
[ ] [For Experimental Features] Documentation to be submitted in a separate PR.
PR Checklist*
[X] I have tested the changes locally.
[X] I have formatted the changes with Prettier and/or cargo fmt on default settings.
Description
Problem*
Resolves #5300
Summary*
Previously the formatter was inserting an extra
<
when formatting functions with a space before<
when specifying generics. We currently mark the starting span for a list of generics as the end of the function name. Having this be the starting span would cause the first generic of the sequence to have<
marked as a leading string when it should not have been. We now start the span for a function's generics by looking for<
rather than starting the span at the end of the function name.Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.