Skip to content

rustfmt should display errors #204

Open
@nikomatsakis

Description

@nikomatsakis

If you run rustfmt and it errors out, it currently just "beeps" and suggests you switch over to *rustfmt*. I think this should be treated like a failed compilation; we should split the frame into two windows, show the errors, and let you use M-x next-error to view them.

Example 1, which errors because it doesn't parse:

fn main() {
    let x &'static str = "aaa";
}

Example 2, undefined module:

mod a;

fn main() {
    let x: &'static str = "aaa";
}

Example 3, long lines:

fn main() {
    let x:
    &'static str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions