rust/src/test/ui/allocator
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
allocator-args.rs syntax_ext: Turn #[global_allocator] into a regular attribute macro 2019-07-24 12:29:44 +03:00
allocator-args.stderr syntax_ext: Reuse built-in attribute template checking for macro attributes 2019-07-24 12:29:45 +03:00
custom-in-block.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
custom-in-submodule.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
custom.rs Replace Memoryblock with NonNull<[u8]> 2020-08-04 18:03:34 +02:00
function-allocator.rs Remove licenses 2018-12-25 21:08:33 -07:00
function-allocator.stderr Update tests 2019-03-11 23:10:26 +03:00
hygiene.rs Remove with_legacy_ctxt 2019-09-15 09:15:38 +01:00
not-an-allocator.rs Remove licenses 2018-12-25 21:08:33 -07:00
not-an-allocator.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
two-allocators.rs syntax_ext: Turn #[global_allocator] into a regular attribute macro 2019-07-24 12:29:44 +03:00
two-allocators.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
two-allocators2.rs normalize use of backticks in compiler messages for librustc_metadata 2019-07-19 22:24:56 +02:00
two-allocators2.stderr normalize use of backticks in compiler messages for librustc_metadata 2019-07-19 22:24:56 +02:00
two-allocators3.rs normalize use of backticks in compiler messages for librustc_metadata 2019-07-19 22:24:56 +02:00
two-allocators3.stderr rustc_metadata: Move has_global_allocator from session to cstore 2019-11-28 20:59:57 +03:00
xcrate-use.rs Replace Memoryblock with NonNull<[u8]> 2020-08-04 18:03:34 +02:00
xcrate-use2.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00