rust/src/test/ui/hr-subtype
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
..
hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.nll.stderr fix subtle bug in NLL type checker 2020-06-22 18:51:08 +00:00
hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
hr-subtype.bound_a_b_vs_bound_a.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_a_vs_bound_a.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_a_vs_bound_b.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_a_vs_free_x.nll.stderr fix subtle bug in NLL type checker 2020-06-22 18:51:08 +00:00
hr-subtype.bound_a_vs_free_x.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
hr-subtype.bound_co_a_b_vs_bound_co_a.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_co_a_co_b_ret_contra_a.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_co_a_vs_bound_co_b.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.bound_inv_a_b_vs_bound_inv_a.nll.stderr fix subtle bug in NLL type checker 2020-06-22 18:51:08 +00:00
hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
hr-subtype.bound_inv_a_vs_bound_inv_b.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr WIP bless test and compare-mode=nll 2020-06-22 18:51:07 +00:00
hr-subtype.free_inv_x_vs_free_inv_y.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
hr-subtype.free_x_vs_free_x.stderr Use smaller def span for functions 2020-08-22 18:41:49 -04:00
hr-subtype.free_x_vs_free_y.nll.stderr WIP bless test and compare-mode=nll 2020-06-22 18:51:07 +00:00
hr-subtype.free_x_vs_free_y.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
hr-subtype.rs move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
return-static.rs add new tests from MCP and the tracking issue 2020-06-22 18:51:07 +00:00