rust/src/test/mir-opt/inline
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
..
inline-any-operand.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-closure-borrows-arg.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-closure-captures.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-closure.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-into-box-place.rs compiletest: ignore-endian-big, fixes #74829, fixes #74885 2020-07-31 12:58:37 +01:00
inline-retag.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-specialization.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-trait-method.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline-trait-method_2.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
inline_any_operand.bar.Inline.after.mir Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
inline_closure.foo.Inline.after.mir move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
inline_closure_borrows_arg.foo.Inline.after.mir move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
inline_closure_captures.foo.Inline.after.mir move Deaggregate pass to post_borrowck_cleanup 2020-08-11 17:09:15 +02:00
inline_into_box_place.main.Inline.diff.32bit pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
inline_into_box_place.main.Inline.diff.64bit pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
inline_retag.bar.Inline.after.mir Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
inline_specialization.main.Inline.diff pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
inline_trait_method.test.Inline.after.mir Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
inline_trait_method_2.test2.Inline.after.mir Suppress "const" prefix of FnDef in MIR dump 2020-08-21 00:36:49 +00:00
issue-58867-inline-as-ref-as-mut.rs add crate name to mir dumps 2020-07-29 13:41:11 +02:00
issue_58867_inline_as_ref_as_mut.a.Inline.after.mir Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00
issue_58867_inline_as_ref_as_mut.b.Inline.after.mir pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
issue_58867_inline_as_ref_as_mut.c.Inline.after.mir Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00
issue_58867_inline_as_ref_as_mut.d.Inline.after.mir pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00