Skip to content

Regression (rustc): Formatting UFCS function calls produces invalid code (needstest) #64

Closed
@pyfisch

Description

@pyfisch
fn header_name<T: Header>() -> &'static str {
    let name = <T as Header>::header_name();
    name
}

is formatted to

fn header_name<T: Header>() -> &'static str {
    let name = <();
    name
}

which is clearly not intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.good first issueIssues up for grabs, also good candidates for new rustfmt contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions