Commit Graph

8 Commits

Author SHA1 Message Date
Guillaume Gomez
5747fd6611 Update ui tests 2018-02-25 12:15:05 +01:00
Esteban Küber
9bd62a4691 Readd backticks around () 2017-08-09 10:48:33 -07:00
Esteban Küber
3fcdb8ba72 Only refer to return type when it matches 2017-08-08 22:59:55 -07:00
Esteban Küber
d96f9d47ac Point at return type always when type mismatch against it
Before this, the diagnostic errors would only point at the return type
when changing it would be a possible solution to a type error. Add a
label to the return type without a suggestion to change in order to make
the source of the expected type obvious.

Follow up to #42850, fixes #25133, fixes #41897.
2017-07-25 22:11:15 -07:00
Ariel Ben-Yehuda
fb7ab9e43d report the total number of errors on compilation failure
Prior to this PR, when we aborted because a "critical pass" failed, we
displayed the number of errors from that critical pass. While that's the
number of errors that caused compilation to abort in *that place*,
that's not what people really want to know. Instead, always report the
total number of errors, and don't bother to track the number of errors
from the last pass that failed.

This changes the compiler driver API to handle errors more smoothly,
and therefore is a compiler-api-[breaking-change].

Fixes #42793.
2017-07-02 16:16:44 +03:00
Esteban Küber
c13a913e5b Don't naively point to return type on type error 2017-06-24 19:28:43 -07:00
Esteban Küber
c023856b38 Detect missing ; on methods with return type ()
- Point out the origin of a type requirement when it is the return type
  of a method
- Point out possibly missing semicolon when the return type is () and
  the implicit return makes sense as a statement
- Suggest changing the return type of methods with default return type
- Don't suggest changing the return type on fn main()
- Don't suggest changing the return type on impl fn
2017-06-24 01:09:27 -07:00
Esteban Küber
8e11189cbb Move tests to ui 2017-06-23 18:01:38 -07:00