rust/src/test/ui/fn
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
..
dyn-fn-alignment.rs Make Box<dyn FnOnce> respect self alignment 2020-04-18 14:37:44 -03:00
expr-fn-panic.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
fn-bad-block-type.rs Remove licenses 2018-12-25 21:08:33 -07:00
fn-bad-block-type.stderr Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
fn-closure-mutable-capture.rs Tweak borrow error on FnMut when Fn is expected 2020-02-03 18:02:44 -08:00
fn-closure-mutable-capture.stderr Tweak borrow error on FnMut when Fn is expected 2020-02-03 18:02:44 -08:00
fn-compare-mismatch.rs Remove licenses 2018-12-25 21:08:33 -07:00
fn-compare-mismatch.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
fn-item-type.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
fn-item-type.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
fn-trait-formatting.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
fn-trait-formatting.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00