21 Commits

Author SHA1 Message Date
Guillaume Gomez
2e104a77cf update tests 2018-03-14 00:53:24 +01:00
Vadim Petrochenkov
7ba5fd168a Update UI tests 2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
fa2d9fc4b9 Update UI tests 2018-02-26 20:24:02 +03:00
Guillaume Gomez
5747fd6611 Update ui tests 2018-02-25 12:15:05 +01:00
Esteban Küber
4a7691692c Further tweaks to the output
- Properly address Variant Ctors
- Show signature if span of trait method without `self` is not available
2018-01-15 12:35:15 -08:00
Vadim Petrochenkov
1f5b201aff Remove NOTE/HELP annotations from UI tests 2017-12-14 23:26:39 +03:00
Oliver Schneider
8937d6a6cf
Merge cfail and ui tests into ui tests 2017-11-24 11:32:35 +01:00
Niko Matsakis
d0bda669ea move the signature into the closure type 2017-11-18 07:47:37 -05:00
Thomas Jespersen
09defbcb5b Add suggestions for misspelled method names
Use the syntax::util::lev_distance module to provide suggestions when a
named method cannot be found.

Part of #30197
2017-09-21 12:05:56 +02: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
Oliver Schneider
401ab612c2 Adjust new suggestions to the suggestion guidelines 2017-07-21 13:59:17 +02:00
Esteban Küber
697c85a4f1 Only underline suggestion if it is not the only code being shown 2017-07-06 14:36:49 -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
7dad2958be Review comments
- Fix typo
- Add docstring
- Remove spurious test output file
2017-06-27 13:34:56 -07: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
27d4b314c5 Do not specify return type in suggestion for some Tys
Don't specify a suggested return type for `TyAnon`, `TyFnDef`,
`TyFnPtr`, `TyDynamic`, `TyClosure` and `TyProjection`.
2017-06-24 12:16:20 -07:00
Esteban Küber
ecde91a69d Suggest removal of semicolon (instead of being help) 2017-06-24 10:08:51 -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