rust/src/test/ui/if
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
..
expr-if-panic-fn.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
expr-if-panic.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
if-branch-types.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-branch-types.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-check-panic.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
if-cond-bot.rs Skip tests on emscripten 2020-05-08 00:39:02 +09:00
if-let-arm-types.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-let-arm-types.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-let.rs Moving more build-pass tests to check-pass 2020-04-23 20:21:38 -07:00
if-let.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
if-loop.rs compiletest: Remove skip-codegen 2019-06-16 12:23:22 +03:00
if-no-match-bindings.rs Make sure while-exprs require 'cond: bool' exactly. 2019-07-06 06:43:58 +02:00
if-no-match-bindings.stderr Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
if-typeck.rs Remove licenses 2018-12-25 21:08:33 -07:00
if-typeck.stderr Surround types with backticks in type errors 2019-11-18 11:03:04 -08:00
if-without-block.rs more recovery in if-parsing 2019-12-23 13:42:25 +01:00
if-without-block.stderr Add help message for missing right operand in condition 2020-04-22 11:57:40 -04:00
if-without-else-as-fn-expr.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-without-else-as-fn-expr.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-without-else-result.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
if-without-else-result.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
ifmt-bad-arg.rs Do not ICE whith a precision flag in formatting str and no format arguments 2019-11-05 11:01:43 -08:00
ifmt-bad-arg.stderr Improve messaging from PR feedback 2020-06-27 18:13:47 +01:00
ifmt-bad-format-args.rs Remove licenses 2018-12-25 21:08:33 -07:00
ifmt-bad-format-args.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
ifmt-unimpl.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
ifmt-unimpl.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
ifmt-unknown-trait.rs Remove licenses 2018-12-25 21:08:33 -07:00
ifmt-unknown-trait.stderr Point at formatting descriptor string when it is invalid 2019-11-05 14:06:38 -08:00