rust/src/test/ui/extern
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 Group all ui tests and move to abi #62593 2019-08-15 16:00:54 +02:00
extern-1.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-calling-convention-test.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-compare-with-return-type.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-const.fixed Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
extern-const.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
extern-const.stderr reject assoc statics & extern consts during parsing 2020-02-15 22:21:00 +01:00
extern-crate-rename.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-crate-rename.stderr Update tests 2019-03-11 23:10:26 +03:00
extern-crate-visibility.rs resolve: Say "import" when reporting private imports 2020-01-16 21:59:11 +03:00
extern-crate-visibility.stderr Normalize wording of privacy access labels 2020-03-22 15:36:54 -07:00
extern-ffi-fn-with-body.rs parser: merge fn grammars wrt. bodies & headers 2020-02-05 01:27:09 +01:00
extern-ffi-fn-with-body.stderr parser: merge fn grammars wrt. bodies & headers 2020-02-05 01:27:09 +01:00
extern-foreign-crate.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-macro.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-macro.stderr Update tests 2019-03-11 23:10:26 +03:00
extern-main-fn.rs Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
extern-main-fn.stderr Add backticks to various diagnostics 2020-01-05 00:17:46 +00:00
extern-methods.rs test: ui: skip tests which aren't appropriate for RISC-V 2020-06-04 15:59:59 +01:00
extern-mod-abi.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-mod-ordering-exe.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-prelude-core.rs Make error and warning annotations mandatory in UI tests 2019-11-10 21:01:02 +01:00
extern-prelude-no-speculative.rs rustc_metadata: Make crate loading fully speculative 2020-07-18 14:06:04 +04:00
extern-prelude-std.rs Make error and warning annotations mandatory in UI tests 2019-11-10 21:01:02 +01:00
extern-pub.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-rust.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-take-value.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-thiscall.rs test: ui: skip tests which aren't appropriate for RISC-V 2020-06-04 15:59:59 +01:00
extern-types-distinct-types.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-types-distinct-types.stderr review comments 2020-01-08 09:29:47 -08:00
extern-types-inherent-impl.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-manual-sync-send.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-not-sync-send.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-types-not-sync-send.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
extern-types-pointer-cast.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-size_of_val.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-thin-pointer.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-trait-impl.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
extern-types-unsized.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-types-unsized.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
extern-vectorcall.rs test: ui: skip tests which aren't appropriate for RISC-V 2020-06-04 15:59:59 +01:00
extern-with-type-bounds.rs Remove licenses 2018-12-25 21:08:33 -07:00
extern-with-type-bounds.stderr Remove licenses 2018-12-25 21:08:33 -07:00
extern-wrong-value-type.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
extern-wrong-value-type.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
extern_fat_drop.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
external-doc-error.rs Update test 2019-07-23 17:57:54 +02:00
external-doc-error.stderr Update test 2019-07-23 17:57:54 +02:00
issue-36122-accessing-externed-dst.rs Add test for issue-36122 2019-11-15 23:54:52 +09:00
issue-36122-accessing-externed-dst.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
issue-64655-allow-unwind-when-calling-panic-directly.rs Test cleanups to match #[track_caller] in panic!. 2020-01-04 10:02:17 -08:00
issue-64655-extern-rust-must-allow-unwind.rs ignore-emcscripten as it does not support threads 2019-10-11 09:57:44 +02:00