span_ends_with_comma in rustfmt_nightly::expr - Rust
Description: Returns `true` if a function call or a method call represented by the given span ends with a trailing comma. This function is used when rewriting macro, as adding or removing a trailing comma from macro can potentially break the code.

Skip to main content

## span_ends_with_comma

# Function span_ends_with_comma

Source

    pub(crate) fn span_ends_with_comma(
        context: &RewriteContext<'_>,
        span: Span,
    ) -> bool

Expand description

Returns `true` if a function call or a method call represented by the given span ends with a trailing comma. This function is used when rewriting macro, as adding or removing a trailing comma from macro can potentially break the code.