rust/src/test/ui/mut
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
..
mut-cant-alias.rs Remove licenses 2018-12-25 21:08:33 -07:00
mut-cant-alias.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mut-cross-borrowing.rs Remove licenses 2018-12-25 21:08:33 -07:00
mut-cross-borrowing.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
mut-pattern-internal-mutability.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mut-pattern-internal-mutability.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mut-pattern-mismatched.rs Specific labels when referring to "expected" and "found" types 2019-11-18 11:02:22 -08:00
mut-pattern-mismatched.stderr check_pat_ref: use pattern_cause 2020-02-25 05:53:21 +01:00
mut-ref.rs tests: Do not use `-Z parse-only`, continue compilation to test recovery 2019-01-06 22:20:46 +03:00
mut-ref.stderr Update tests 2019-03-11 23:10:26 +03:00
mut-suggestion.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mut-suggestion.stderr update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mutable-class-fields-2.rs Remove licenses 2018-12-25 21:08:33 -07:00
mutable-class-fields-2.stderr Update ui tests 2019-11-18 19:00:10 +01:00
mutable-class-fields.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
mutable-class-fields.stderr Update ui tests 2019-11-18 19:00:10 +01:00
mutable-enum-indirect.rs introduce `negative_impls` feature gate and document 2020-03-26 06:52:55 -04:00
mutable-enum-indirect.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
no-mut-lint-for-desugared-mut.rs Only warn about unused `mut` in user-written code 2018-10-03 14:14:11 +01:00