Commit graph

11 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Andy Wang
84a199369b
Reword "Required because of the requirements on the impl of ..." 2022-08-18 21:08:08 +01:00
Michael Goulet
862873d20b Note concrete type being coerced into object 2022-06-28 21:56:18 +00:00
Esteban Küber
99f2977031 Modify structured suggestion output
* On suggestions that include deletions, use a diff inspired output format
* When suggesting addition, use `+` as underline
* Color highlight modified span
2021-08-11 09:46:24 +00:00
Esteban Küber
8bc5581978 Point at impl and type defs introducing requirements on E0277 2021-04-06 19:55:44 -07: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
Esteban Küber
45738e8cd1 Increase verbosity of bound restriction suggestions
- Make the bound restriction suggestion `span_suggestion_verbose`.
- Fix whitespace typo.
2020-05-12 11:19:07 -07:00
Esteban Küber
5cc99eed04 Handle missing projection restriction 2019-10-15 13:55:44 -07:00
memoryruins
eb4580a570 Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
Niko Matsakis
d3c96ff152 tests: worse diagnostics, but basically same errors 2019-01-02 17:35:05 -05:00
Esteban Küber
330b7eda95 Add regression test (#22872) 2018-10-09 19:00:41 -07:00