Commit graph

6 commits

Author SHA1 Message Date
Aaron Hill
611a06a375
Add an explicit Span field to OutlivesConstraint
Previously, we would retrieve the span from the `Body` using
the `locations` field. However, we may end up changing the
`locations` field when moving a constraint from a promoted
to a different body.

We now store the original `Span` in a dedication field, so that
changes to the `locations` do not affect the quality of our
diagnostics.
2022-04-19 23:42:20 -04:00
Roxane
2fb1fb7634 Fix diagnostic issue when using FakeReads in closures 2021-04-02 19:11:50 -04:00
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
Lzu Tao
86cf46172f Suppress MIR comments of Unit type 2020-08-20 09:32:35 +00:00
Austin Lasher
28ac141b72 Update MIR tests with comment verbosity fix 2020-08-17 17:29:48 -04:00
Xavier Denis
f07607f47a Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00
Renamed from src/test/mir-opt/storage_ranges/storage_ranges.main.nll.0.mir (Browse further)