rust/src/test/ui/unused
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
..
unused-attr.rs
unused-attr.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-closure.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unused-closure.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
unused-macro-rules.rs
unused-macro-rules.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
unused-macro-with-bad-frag-spec.rs
unused-macro-with-bad-frag-spec.stderr
unused-macro-with-follow-violation.rs
unused-macro-with-follow-violation.stderr
unused-macro.rs
unused-macro.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-mut-warning-captured-var.fixed Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-mut-warning-captured-var.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-mut-warning-captured-var.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
unused-result.rs Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-result.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00