Skip to content

Inconsistent formatting of Stdin #4117

@mookid

Description

@mookid

When formatting source code location errors, the formatting in the stdin case depends on the error level:

  • case of a formatting error: <stdin>:line:column
  --> <stdin>:14:33
   |
14 |                         .takes_ value(true)
   |                                 ^^^^^ expected one of `)`, `,`, `.`, `::`, `?`, or an operator here

  • case of an internal error: stdin:line:column
error[internal]: left behind trailing whitespace
  --> stdin:13:13:0
   |
13 |
   | ^^^^^^^^^^^^^^^^
   |

This is confusing for anyone that consumes the output of the command (rust-lang/rust-mode#365)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions