rust/src/test/ui/malformed
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
..
issue-69341-malformed-derive-inert.rs error_derive_forbidden_on_non_adt: be more graceful 2020-02-27 20:09:14 +01:00
issue-69341-malformed-derive-inert.stderr error_derive_forbidden_on_non_adt: be more graceful 2020-02-27 20:09:14 +01:00
malformed-derive-entry.rs derive: avoid parse_in_attr 2019-12-06 20:37:59 +01:00
malformed-derive-entry.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
malformed-interpolated.rs Introduce #[rustc_dummy] attribute and use it in tests 2019-06-08 23:55:25 +03:00
malformed-interpolated.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
malformed-meta-delim.rs parse_meta: ditch parse_in_attr 2019-12-06 21:17:18 +01:00
malformed-meta-delim.stderr parse_meta: ditch parse_in_attr 2019-12-06 21:17:18 +01:00
malformed-plugin-1.rs plugin_registrary: use normal deprecation instead of hard coded warning. 2019-10-03 07:03:01 +02:00
malformed-plugin-1.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
malformed-plugin-2.rs plugin_registrary: use normal deprecation instead of hard coded warning. 2019-10-03 07:03:01 +02:00
malformed-plugin-2.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
malformed-plugin-3.rs plugin_registrary: use normal deprecation instead of hard coded warning. 2019-10-03 07:03:01 +02:00
malformed-plugin-3.stderr rustc: Add a warning count upon completion 2020-04-11 16:15:24 +02:00
malformed-regressions.rs ill_formed_attribute_input -> deny 2019-11-06 11:10:37 +01:00
malformed-regressions.stderr #[link]: mention wasm_import_module instead of cfg 2020-03-29 17:40:04 +02:00
malformed-special-attrs.rs cfg_attr: avoid .outer_tokens 2019-12-06 20:37:59 +01:00
malformed-special-attrs.stderr cfg_attr: avoid .outer_tokens 2019-12-06 20:37:59 +01:00
malformed-unwind-1.rs Reword malformed attribute input diagnostics 2019-05-25 11:55:50 -07:00
malformed-unwind-1.stderr Reword malformed attribute input diagnostics 2019-05-25 11:55:50 -07:00
malformed-unwind-2.rs Reword malformed attribute input diagnostics 2019-05-25 11:55:50 -07:00
malformed-unwind-2.stderr Increase spacing for suggestions in diagnostics 2019-10-24 12:26:01 -07:00