rust-lang/rust — pull request #19203 by mdinger (2014-11-22 00:51:55+00:00)
Title: Align error messages for easier comparing

Closes #18946

This fix is very simple. Aligns, fixes the second set of backticks, and doesn't do color changes as suggested in #18946. Aligning is definitely nice...maybe the `expected/found` lines should be tabbed out. I'm unsure.

---

Given this:
```rust
fn test() -> Option {
Ok(7) // Should be Some(7)
}
fn main(){
test();
}
```
Previously returned:
```
:2:5: 2:10 error: mismatched types: expected `core::option::Option`, found `core::result::Result<_, _>` (expected enum core::option::Option, found enum core::result::Result)
:2 Ok(7)
^~~~~
error: aborting due to previous error
playpen: application terminated with error code 101
```

Now returns:
```
$ ./rustc test.rs
test.rs:2:5: 2:10 error: mismatched types:
expected `core::option::Option`,
found `core::result::Result<_, _>`
(expected `enum core::option::Option`,
found `enum core::result::Result`)
test.rs:2 Ok(7) // Should be Some(7)
^~~~~
error: aborting due to previous error
```