Skip to content

Columns in spans are one-too-small by convention #10848

Closed
@huonw

Description

@huonw

E.g. a file that consists of a single & generates the following errors in rustc & gcc respectively (other compilers match gcc):

column.rs:1:0: 1:1 error: expected item but found `&`
column.rs:1 &
            ^
column.c:1:1: error: expected identifier or ‘(’ before ‘&’ token
 &
 ^

The column mismatch for the start of the expression (i.e. the 0 in 1:0:) means that Emacs' M-x compile jump-to-error mode lands one column before the expression in question.

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