rust/src/test/ui/coercion
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
..
coerce-expect-unsized-ascribed.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
coerce-expect-unsized-ascribed.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
coerce-expect-unsized.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-issue-49593-box-never.rs Revert "Remove #![feature(never_type)] from tests." 2019-12-14 09:01:04 -05:00
coerce-mut.rs Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
coerce-mut.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
coerce-overloaded-autoderef-fail.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-overloaded-autoderef-fail.stderr merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-overloaded-autoderef.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-imm-ptr-arg.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-imm-ptr-rcvr.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-imm-vec-arg.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-imm-vec-rcvr.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-multi-arg-fail.rs coerce reborrow multi arg test 2020-06-19 11:06:21 +02:00
coerce-reborrow-multi-arg-fail.stderr coerce reborrow multi arg test 2020-06-19 11:06:21 +02:00
coerce-reborrow-multi-arg.rs coerce reborrow multi arg test 2020-06-19 11:06:21 +02:00
coerce-reborrow-mut-ptr-arg.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-mut-ptr-rcvr.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-mut-vec-arg.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-reborrow-mut-vec-rcvr.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-to-bang-cast.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-to-bang-cast.stderr merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-to-bang.rs Revert "Remove #![feature(never_type)] from tests." 2019-12-14 09:01:04 -05:00
coerce-to-bang.stderr Revert "Remove #![feature(never_type)] from tests." 2019-12-14 09:01:04 -05:00
coerce-unify-return.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-unify.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coerce-unsize-subtype.rs merge coercion test folders 2020-06-19 10:55:38 +02:00
coercion-missing-tail-expected-type.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
coercion-missing-tail-expected-type.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
coercion-missing-tail-expected-type.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
coercion-slice.rs Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
coercion-slice.stderr Point at type in let assignment on type errors 2019-11-21 19:24:31 -08:00