rust/src/test/ui/specialization/min_specialization
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
..
auxiliary
dyn-trait-assoc-types.rs
dyn-trait-assoc-types.stderr
impl-on-nonexisting.rs do not try fetching the ancestors of errored trait impls 2020-07-19 15:45:44 +02:00
impl-on-nonexisting.stderr do not try fetching the ancestors of errored trait impls 2020-07-19 15:45:44 +02:00
impl_specialization_trait.rs
impl_specialization_trait.stderr
implcit-well-formed-bounds.rs Consider well-formed predicates in min-specialization 2020-03-15 13:49:28 +00:00
repeated_projection_type.rs
repeated_projection_type.stderr PredicateKint -> PredicateKind, the beginning of the end 2020-07-27 21:06:36 +02:00
repeating_lifetimes.rs
repeating_lifetimes.stderr
repeating_param.rs
repeating_param.stderr
spec-iter.rs
spec-reference.rs
specialization_marker.rs
specialization_marker.stderr
specialization_super_trait.rs Consider well-formed predicates in min-specialization 2020-03-15 13:49:28 +00:00
specialization_super_trait.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
specialization_trait.rs
specialization_trait.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
specialize_on_marker.rs
specialize_on_spec_trait.rs
specialize_on_static.rs
specialize_on_static.stderr
specialize_on_trait.rs
specialize_on_trait.stderr