about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-10 23:44:44 -0800
committerGitHub <noreply@github.com>2016-11-10 23:44:44 -0800
commit280362a02df97670dd08ed19557c81b504b395c3 (patch)
tree17941eae11c710c6924e6879c1967a48171e3a9d /src/test/run-pass/thinlto
parent3ac9ec7dfdd3839f03b94e70d7187a30e7b7f759 (diff)
parent12f0b6f2fb5ab0bdad539fc28b12d6161901103f (diff)
downloadrust-280362a02df97670dd08ed19557c81b504b395c3.tar.gz
rust-280362a02df97670dd08ed19557c81b504b395c3.zip
Auto merge of #36615 - sinkuu:e0243_0244, r=nrc
Make E0243/E0244 message consistent with E0107

E0243/E0233 prints `expected {}, found {}` on the span note, while E0107 prints it on the first line. This is confusing when both error occur simultaneously.

This PR makes E0243/E0233 print `expected {}, found {}` on the first line.

Code:

``` rust
struct Foo<'a, 'b> {
    s: &'a str,
    t: &'b str,
}

type Bar<T, U> = Foo<T, U>;
```

rustc output (before):

```
error[E0107]: wrong number of lifetime parameters: expected 2, found 0
 --> test.rs:6:18
  |
6 | type Bar<T, U> = Foo<T, U>;
  |                  ^^^^^^^^^ expected 2 lifetime parameters

error[E0244]: wrong number of type arguments
 --> test.rs:6:18
  |
6 | type Bar<T, U> = Foo<T, U>;
  |                  ^^^^^^^^^ expected no type arguments, found 2
```

rustc output (after):

```
error[E0107]: wrong number of lifetime parameters: expected 2, found 0
 --> /tmp/test.rs:6:18
  |
6 | type Bar<T, U> = Foo<T, U>;
  |                  ^^^^^^^^^ expected 2 lifetime parameters

error[E0244]: wrong number of type arguments: expected 0, found 2
 --> /tmp/test.rs:6:18
  |
6 | type Bar<T, U> = Foo<T, U>;
  |                  ^^^^^^^^^ expected no type arguments
```
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions