rust/src/test/ui/structs
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
rhs-type.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
struct-base-wrong-type.rs
struct-base-wrong-type.stderr Remove E0308 note when primary label has all info 2019-11-18 11:03:03 -08:00
struct-duplicate-comma.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-duplicate-comma.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-duplicate-comma.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-field-cfg.rs
struct-field-cfg.stderr
struct-field-init-syntax.rs
struct-field-init-syntax.stderr
struct-field-privacy.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
struct-field-privacy.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
struct-fields-decl-dupe.rs
struct-fields-decl-dupe.stderr
struct-fields-dupe.rs
struct-fields-dupe.stderr
struct-fields-hints-no-dupe.rs
struct-fields-hints-no-dupe.stderr
struct-fields-hints.rs
struct-fields-hints.stderr
struct-fields-missing.rs
struct-fields-missing.stderr
struct-fields-shorthand-unresolved.rs
struct-fields-shorthand-unresolved.stderr
struct-fields-shorthand.rs
struct-fields-shorthand.stderr
struct-fields-too-many.rs
struct-fields-too-many.stderr
struct-fields-typo.rs
struct-fields-typo.stderr
struct-missing-comma.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-missing-comma.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-missing-comma.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
struct-pat-derived-error.rs
struct-pat-derived-error.stderr
struct-path-alias-bounds.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
struct-path-alias-bounds.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
struct-path-associated-type.rs Update tests for GATs 2019-12-21 12:35:28 +00:00
struct-path-associated-type.stderr Update tests for GATs 2019-12-21 12:35:28 +00:00
struct-path-self-type-mismatch.rs
struct-path-self-type-mismatch.stderr Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
struct-path-self.rs
struct-path-self.stderr
struct-variant-privacy-xc.rs
struct-variant-privacy-xc.stderr Normalize wording of privacy access labels 2020-03-22 15:36:54 -07:00
struct-variant-privacy.rs
struct-variant-privacy.stderr Normalize wording of privacy access labels 2020-03-22 15:36:54 -07:00
structure-constructor-type-mismatch.rs Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
structure-constructor-type-mismatch.stderr MatchExpressionArmPattern: Use more generic wording. 2019-12-30 13:50:20 +01:00