rust/src/test/ui/variance
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
..
variance-associated-types.rs
variance-associated-types.stderr hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
variance-associated-types2.nll.stderr Relate existential associated types with variance Invariant 2020-06-09 13:21:27 -03:00
variance-associated-types2.rs Relate existential associated types with variance Invariant 2020-06-09 13:21:27 -03:00
variance-associated-types2.stderr Relate existential associated types with variance Invariant 2020-06-09 13:21:27 -03:00
variance-btree-invariant-types.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-btree-invariant-types.rs
variance-btree-invariant-types.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
variance-cell-is-invariant.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-cell-is-invariant.rs
variance-cell-is-invariant.stderr Update ui tests 2019-11-07 13:02:34 +01:00
variance-contravariant-arg-object.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-contravariant-arg-object.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-contravariant-arg-object.stderr review comments: tweak prefix strings 2019-11-18 11:02:44 -08:00
variance-contravariant-arg-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-contravariant-arg-trait-match.rs
variance-contravariant-arg-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-contravariant-self-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-contravariant-self-trait-match.rs
variance-contravariant-self-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-covariant-arg-object.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-covariant-arg-object.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-covariant-arg-object.stderr review comments: tweak prefix strings 2019-11-18 11:02:44 -08:00
variance-covariant-arg-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-covariant-arg-trait-match.rs
variance-covariant-arg-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-covariant-self-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-covariant-self-trait-match.rs
variance-covariant-self-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-invariant-arg-object.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-invariant-arg-object.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-invariant-arg-object.stderr review comments: tweak prefix strings 2019-11-18 11:02:44 -08:00
variance-invariant-arg-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-invariant-arg-trait-match.rs
variance-invariant-arg-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-invariant-self-trait-match.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-invariant-self-trait-match.rs
variance-invariant-self-trait-match.stderr Print lifetimes with backticks 2019-10-11 16:08:53 +09:00
variance-issue-20533.rs
variance-issue-20533.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
variance-object-types.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-object-types.stderr Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-regions-direct.rs
variance-regions-direct.stderr hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
variance-regions-indirect.rs
variance-regions-indirect.stderr hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
variance-regions-unused-direct.rs
variance-regions-unused-direct.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
variance-regions-unused-indirect.rs
variance-regions-unused-indirect.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
variance-trait-bounds.rs
variance-trait-bounds.stderr hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
variance-trait-matching.nll.stderr Change compare mode to use -Zborrowck=mir 2019-05-12 18:46:43 +01:00
variance-trait-matching.rs
variance-trait-matching.stderr Update tests 2019-03-11 23:10:26 +03:00
variance-trait-object-bound.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-trait-object-bound.stderr Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-types-bounds.rs Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-types-bounds.stderr Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
variance-types.rs
variance-types.stderr hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
variance-unused-region-param.rs
variance-unused-region-param.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
variance-unused-type-param.rs
variance-unused-type-param.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
variance-use-contravariant-struct-1.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-use-contravariant-struct-1.rs
variance-use-contravariant-struct-1.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
variance-use-contravariant-struct-2.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
variance-use-covariant-struct-1.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-use-covariant-struct-1.rs
variance-use-covariant-struct-1.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
variance-use-covariant-struct-2.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
variance-use-invariant-struct-1.nll.stderr update tests 2019-10-27 09:39:14 -05:00
variance-use-invariant-struct-1.rs
variance-use-invariant-struct-1.stderr Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00