Dan Aloni
07e7823c01
pretty: trim paths of unique symbols
...
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.
This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.
This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.
On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.
This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
2020-09-02 22:26:37 +03:00
Aaron Hill
3295c262ae
Treat selection error as ambiguous when error type is present
2020-06-04 21:09:31 -04:00
Matthew Jasper
8894bd220b
Add descriptions for all queries
2020-05-31 20:15:32 +01:00
Esteban Küber
d605a9d969
Small tweaks to required bound span
2020-04-08 14:40:51 -07:00
Matthew Jasper
78e0ab53fb
Update tests
2020-02-14 22:40:03 +00:00
Matthew Jasper
93ac5bc7de
Update tests
2020-02-14 22:40:03 +00:00
Mazdak Farrokhzad
aabb03763d
Rollup merge of #66463 - estebank:point-at-closure-and-opaque-types, r=Centril
...
Point at opaque and closure type definitions in type errors
Fixes #57266 , fixes #67117 .
2020-01-10 02:47:29 +01:00
Vadim Petrochenkov
642669c74d
Update tests
2020-01-09 21:23:12 +03:00
Esteban Küber
0dcdbaec0b
Point at the def span of trait refs E0277
2020-01-08 09:30:27 -08:00
Esteban Küber
b370c111fd
On obligation errors point at the unfulfilled binding when possible
2019-09-22 11:33:12 -07:00
Esteban Küber
444bc3ca66
Use span label instead of note for cause in E0631
2019-08-31 00:14:23 -07:00
varkor
497dcfa221
Update ui tests
2019-04-23 11:42:14 +01:00
Andy Russell
b6f148c8bd
hide --explain
hint if error has no extended info
2019-04-18 13:29:28 -04:00
Eduard-Mihai Burtescu
a54a41ce47
rustc: provide DisambiguatedDefPathData in ty::print.
2019-03-15 13:25:10 +02:00
Esteban Küber
c4b8df5df2
Remove unnecessary dummy span checks
...
The emitter already verifies wether a given span note or span label
can be emitted to the output. If it can't, because it is a dummy
span, it will be either elided for labels or emitted as an unspanned
note/help when applicable.
2019-01-20 13:29:03 -08:00
John Kåre Alsaker
468254b38f
Update tests
2019-01-11 03:53:30 +01:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Oliver Schneider
3e215a3c87
Typeck existential types properly
2018-07-18 10:53:08 +02:00
Oliver Schneider
99575b5cac
Update ui tests
2018-06-27 12:03:59 +02:00
Oliver Schneider
1b202426dc
fixup
2018-06-27 11:17:55 +02:00
Oliver Schneider
28a76a9000
Don't inspect the generated existential type items
2018-06-26 16:36:32 +02:00
Esteban Küber
776544f011
Add message to rustc_on_unimplemented
attributes in core
2018-06-19 15:19:13 -07:00
Oliver Schneider
9b1bd94e37
Add existential type definitons
2018-06-07 17:33:53 +02:00
Aravind Gollakota
bc16b8e92a
Port existing callers of evaluate_obligation
to the new canonical trait query
...
Except the one in coherence, which needs support for intercrate mode.
2018-04-26 20:28:30 -05:00
John Kåre Alsaker
9cbe3b749d
Update tests
2018-04-16 23:30:36 +02:00
Taylor Cramer
0f5b52e4a8
Stabilize conservative_impl_trait
2018-03-26 10:43:03 +02:00
Guillaume Gomez
2e104a77cf
update tests
2018-03-14 00:53:24 +01: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
John Kåre Alsaker
46a3f2fa18
Change error message for E0391 to "cyclic dependency detected"
2018-02-10 03:28:15 +01:00
Esteban Küber
9b36030a65
On E0283, point at method with the requirements
...
On required type annotation diagnostic error, point at method with the
requirements if the span is available.
2018-01-15 14:56:32 -08:00
Vadim Petrochenkov
1f5b201aff
Remove NOTE/HELP annotations from UI tests
2017-12-14 23:26:39 +03:00
Esteban Küber
8a93deca9a
Make main span in impl-trait ciclic reference point to def_span
2017-11-27 06:00:20 -08:00
Esteban Küber
0b2d21e32b
Make impl-trait ciclical reference error point to def_span
2017-11-26 12:35:19 -08:00
Esteban Küber
aabb604313
Move "auto trait leak" impl-trait cycle dependency test to ui
2017-11-26 12:32:30 -08:00