rust/src/test/ui/pub
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
..
issue-33174-restricted-type-in-public-interface.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
issue-33174-restricted-type-in-public-interface.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
pub-ident-fn-2.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn-2.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn-2.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn-3.rs
pub-ident-fn-3.stderr
pub-ident-fn-or-struct-2.rs
pub-ident-fn-or-struct-2.stderr
pub-ident-fn-or-struct.rs
pub-ident-fn-or-struct.stderr
pub-ident-fn-with-lifetime-2.rs
pub-ident-fn-with-lifetime-2.stderr Increase spacing for suggestions in diagnostics 2019-10-24 12:26:01 -07:00
pub-ident-fn-with-lifetime.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn-with-lifetime.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn-with-lifetime.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-fn.fixed
pub-ident-fn.rs
pub-ident-fn.stderr Increase spacing for suggestions in diagnostics 2019-10-24 12:26:01 -07:00
pub-ident-struct-with-lifetime.rs
pub-ident-struct-with-lifetime.stderr Increase spacing for suggestions in diagnostics 2019-10-24 12:26:01 -07:00
pub-ident-struct.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-struct.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-struct.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
pub-ident-with-lifetime-incomplete.rs
pub-ident-with-lifetime-incomplete.stderr
pub-reexport-priv-extern-crate.rs
pub-reexport-priv-extern-crate.stderr normalize use of backticks in compiler messages for librustc/lint 2019-07-17 22:49:48 +02:00
pub-restricted-error-fn.rs parse: tweak diagnostic wordings 2020-02-24 00:59:38 +01:00
pub-restricted-error-fn.stderr parse: tweak diagnostic wordings 2020-02-24 00:59:38 +01:00
pub-restricted-error.rs
pub-restricted-error.stderr
pub-restricted-non-path.rs
pub-restricted-non-path.stderr
pub-restricted.rs
pub-restricted.stderr Change E0741 into E0742 2019-10-29 13:59:40 +01:00