Commit graph

9 commits

Author SHA1 Message Date
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
Esteban Küber
1d9472b470 Update nll tests 2020-05-30 10:22:26 -07:00
Matthew Jasper
8ffa408059 Update tests for changes to cannot move errors 2019-06-03 14:55:29 +01:00
memoryruins
eb4580a570 Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
Matthew Jasper
ff71b80a85 Change compare mode to use -Zborrowck=mir 2019-05-12 18:46:43 +01:00
David Wood
539404b77d
Update output for borrowck=migrate compare mode.
This commit updates the test output for the updated NLL compare mode
that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The
previous commit changes `compiletest` and this commit only updates
`.nll.stderr` files.
2018-10-17 00:57:32 +02:00
Basile Desloges
b01550a718 Update tests 2018-09-01 12:58:18 +02:00
Matthew Jasper
7f7fadaee6 Also use smaller spans for unsize adjustments 2018-08-27 12:36:49 +01:00
David Wood
3fc7ab2373
Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
Renamed from src/test/ui/compile-fail-migration/object-lifetime-default-from-box-error.nll.stderr (Browse further)