Skip to content

Bad span for try shorthand #32709

Closed
Closed
@marcusklaas

Description

@marcusklaas

The span associated to the expression in

fn test() {
    a?
}

includes the closing brace, which it should not.

Found this after @erikjohnson mentioned a fatal error in rustfmt here.

I'm working on a patch for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions