rust/src/test/ui/lifetimes
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 Remove licenses 2018-12-25 21:08:33 -07:00
lifetime-errors pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
borrowck-let-suggestion.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
borrowck-let-suggestion.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
issue-34979.rs Add test for #34979 2020-05-07 02:22:08 +09:00
issue-34979.stderr Add test for #34979 2020-05-07 02:22:08 +09:00
issue-70917-lifetimes-in-fn-def.rs outlives: ignore lifetimes shallowly found in ty::FnDefs. 2020-04-16 23:18:44 +03:00
lifetime-bound-will-change-warning.nll.stderr update tests 2019-10-27 09:39:14 -05:00
lifetime-bound-will-change-warning.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
lifetime-bound-will-change-warning.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
lifetime-doesnt-live-long-enough.rs Remove licenses 2018-12-25 21:08:33 -07:00
lifetime-doesnt-live-long-enough.stderr Suggest boxing or borrowing unsized fields 2020-07-14 10:50:24 -07:00
lifetime-elision-return-type-requires-explicit-lifetime.rs Remove licenses 2018-12-25 21:08:33 -07:00
lifetime-elision-return-type-requires-explicit-lifetime.stderr Tweak wording 2020-04-22 12:12:33 -07:00
lifetime-elision-return-type-trait.rs distinguish object-lifetime-default elision from other elision 2019-08-19 13:50:42 -04:00
lifetime-elision-return-type-trait.stderr review comments 2020-01-16 09:49:13 -08:00
lifetime-mismatch-between-trait-and-impl.rs review comments 2019-10-29 10:19:58 -07:00
lifetime-mismatch-between-trait-and-impl.stderr review comments: change wording and visual output 2020-05-27 20:58:05 -07:00
lifetime-no-keyword.rs Remove licenses 2018-12-25 21:08:33 -07:00
lifetime-no-keyword.stderr Update tests 2019-03-11 23:10:26 +03:00
unnamed-closure-doesnt-life-long-enough-issue-67634.rs Use an 'approximate' universal upper bound when reporting region errors 2020-06-27 14:01:59 -04:00
unnamed-closure-doesnt-life-long-enough-issue-67634.stderr Use an 'approximate' universal upper bound when reporting region errors 2020-06-27 14:01:59 -04:00