rust/src/test/ui/asm
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
..
bad-arch.rs tests: Mark ui/asm/bad-arch.rs as requiring wasm llvm backend 2020-08-09 11:40:48 +03:00
bad-arch.stderr tests: Mark ui/asm/bad-arch.rs as requiring wasm llvm backend 2020-08-09 11:40:48 +03:00
bad-options.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
bad-options.stderr Add tests for asm! 2020-05-18 14:41:32 +01:00
bad-reg.rs Add support for high byte registers on x86 2020-05-18 14:41:32 +01:00
bad-reg.stderr Add borrow-check test 2020-05-18 14:41:34 +01:00
bad-template.rs Add a suggestion to use unused asm arguments in comments 2020-06-11 05:34:43 +01:00
bad-template.stderr Add a suggestion to use unused asm arguments in comments 2020-06-11 05:34:43 +01:00
const.rs Fix const handling and add tests for const operands 2020-05-18 14:41:35 +01:00
duplicate-options.fixed Make suggestion machine-applicable 2020-06-20 11:12:43 -07:00
duplicate-options.rs Make suggestion machine-applicable 2020-06-20 11:12:43 -07:00
duplicate-options.stderr Fix duplicate options error 2020-06-20 11:12:43 -07:00
issue-72570.rs add test for #72960 2020-06-05 12:08:54 +02:00
issue-72570.stderr add test for #72960 2020-06-05 12:08:54 +02:00
noreturn.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
parse-error.rs Update tests 2020-06-20 11:12:42 -07:00
parse-error.stderr Update tests 2020-06-20 11:12:42 -07:00
rustfix-asm.fixed Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
rustfix-asm.rs Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
rustfix-asm.stderr Clarify errors and warnings about the transition to the new asm! 2020-05-31 18:25:05 +01:00
srcloc.rs asm: Allow multiple template strings; interpret them as newline-separated 2020-06-15 12:35:27 -07:00
srcloc.stderr asm: Allow multiple template strings; interpret them as newline-separated 2020-06-15 12:35:27 -07:00
sym.rs Stabilize #[track_caller]. 2020-06-30 22:22:32 -07:00
type-check-1.rs Add tests for asm! 2020-05-18 14:41:32 +01:00
type-check-1.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-check-2.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-check-2.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-check-3.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-check-3.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
type-check-4.rs Add borrow-check test 2020-05-18 14:41:34 +01:00
type-check-4.stderr Add borrow-check test 2020-05-18 14:41:34 +01:00