rust/src/test/ui/where-clauses
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 tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clause-bounds-inconsistency.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clause-constraints-are-local-for-inherent-impl.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clause-constraints-are-local-for-inherent-impl.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clause-constraints-are-local-for-trait-impl.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clause-constraints-are-local-for-trait-impl.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clause-early-bound-lifetimes.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clause-method-substituion-rpass.rs tests: Move run-pass tests with naming conflicts to ui 2019-07-27 18:56:17 +03:00
where-clause-method-substituion.rs
where-clause-method-substituion.stderr
where-clause-region-outlives.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clauses-cross-crate.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clauses-lifetimes.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clauses-method-unsatisfied.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clauses-method-unsatisfied.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clauses-method.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clauses-unboxed-closures.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-clauses-unsatisfied.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clauses-unsatisfied.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
where-clauses.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
where-equality-constraints.rs Add the full issue reference to equality constraints in where clauses 2019-12-23 11:15:55 +00:00
where-equality-constraints.stderr --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
where-for-self-2.nll.stderr fix subtle bug in NLL type checker 2020-06-22 18:51:08 +00:00
where-for-self-2.rs remove snapshot calls from "match" operations during select 2020-06-22 18:51:05 +00:00
where-for-self-2.stderr remove snapshot calls from "match" operations during select 2020-06-22 18:51:05 +00:00
where-for-self.rs
where-for-self.stderr
where-lifetime-resolution.rs Correctly handle binders inside trait predicates 2020-06-20 12:13:20 +01:00
where-lifetime-resolution.stderr Tweak wording 2020-07-10 07:24:18 +09:00