Skip to content

Regression in spacing of left margin in diagnostics #65001

Closed
@dtolnay

Description

@dtolnay
struct A;
//
//
//
//
//
//
//
fn main() {
    let _: () = A;
    let _: () = B;
}

$ cargo +nightly-2019-10-01 check

This is the correct output.

error[E0425]: cannot find value `B` in this scope
  --> src/main.rs:11:17
   |
11 |     let _: () = B;
   |                 ^ help: a unit struct with a similar name exists: `A`

error[E0308]: mismatched types
  --> src/main.rs:10:17
   |
10 |     let _: () = A;
   |                 ^ expected (), found struct `A`
   |
   = note: expected type `()`
              found type `A`

$ cargo +nightly-2019-10-02 check

Notice that one of the errors has a column of whitespace between the line number and the pipes, the next does not.

error[E0425]: cannot find value `B` in this scope
  --> src/main.rs:11:17
   |
11 |     let _: () = B;
   |                 ^ help: a unit struct with a similar name exists: `A`

error[E0308]: mismatched types
 --> src/main.rs:10:17
  |
10|     let _: () = A;
  |                 ^ expected (), found struct `A`
  |
  = note: expected type `()`
             found type `A`

Commit range: 22bc9e1...702b45e

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions