rust/src/test/ui/object-lifetime
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
..
object-lifetime-default-ambiguous.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
object-lifetime-default-ambiguous.stderr add long error explanation for E0228 2020-05-12 17:09:09 -07:00
object-lifetime-default-dyn-binding-nonstatic1.rs use static as object-lifetime default for type XX in Foo<Item=XX> 2019-08-19 13:50:44 -04:00
object-lifetime-default-dyn-binding-nonstatic1.stderr add long error explanation for E0228 2020-05-12 17:09:09 -07:00
object-lifetime-default-dyn-binding-nonstatic2.rs use static as object-lifetime default for type XX in Foo<Item=XX> 2019-08-19 13:50:44 -04:00
object-lifetime-default-dyn-binding-nonstatic2.stderr add long error explanation for E0228 2020-05-12 17:09:09 -07:00
object-lifetime-default-dyn-binding-nonstatic3.rs use static as object-lifetime default for type XX in Foo<Item=XX> 2019-08-19 13:50:44 -04:00
object-lifetime-default-dyn-binding-nonstatic3.stderr add long error explanation for E0228 2020-05-12 17:09:09 -07:00
object-lifetime-default-dyn-binding-static.rs use static as object-lifetime default for type XX in Foo<Item=XX> 2019-08-19 13:50:44 -04:00
object-lifetime-default-elision.nll.stderr update tests 2019-10-27 09:39:14 -05:00
object-lifetime-default-elision.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
object-lifetime-default-elision.stderr Fix spacing of expected/found notes without a label 2020-05-27 16:27:15 -07:00
object-lifetime-default-from-box-error.nll.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
object-lifetime-default-from-box-error.rs Further tweak wording of E0759 and introduce E0767 2020-07-22 12:25:54 -07:00
object-lifetime-default-from-box-error.stderr Further tweak wording of E0759 and introduce E0767 2020-07-22 12:25:54 -07:00
object-lifetime-default-from-rptr-box-error.nll.stderr update tests 2019-10-27 09:39:14 -05:00
object-lifetime-default-from-rptr-box-error.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
object-lifetime-default-from-rptr-box-error.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
object-lifetime-default-from-rptr-struct-error.nll.stderr update tests 2019-10-27 09:39:14 -05:00
object-lifetime-default-from-rptr-struct-error.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
object-lifetime-default-from-rptr-struct-error.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
object-lifetime-default-mybox.nll.stderr update tests 2019-10-27 09:39:14 -05:00
object-lifetime-default-mybox.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
object-lifetime-default-mybox.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
object-lifetime-default.rs Remove licenses 2018-12-25 21:08:33 -07:00
object-lifetime-default.stderr Make sure #[rustc_doc_only_macro] and other rustc attributes are registered 2019-06-30 12:47:33 +03:00