Commit Graph

8 Commits

Author SHA1 Message Date
Aaron Hill
0dd9f118d9
Show macro name in 'this error originates in macro' message
When there are multiple macros in use, it can be difficult to tell
which one was responsible for producing an error.
2021-05-12 19:03:06 -04:00
Ralf Jung
3752c6bb40 remove const_fn feature gate from const tests 2021-04-29 09:27:45 +02:00
Ralf Jung
8477d352ac make const_err a future incompat lint 2021-02-03 15:45:43 +01:00
Ralf Jung
48f9dbfd59 clean up some const error reporting around promoteds 2021-01-24 13:34:34 +01: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
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00
Nazım Can Altınova
6cd164f49e Update UB test to fail during build with contant errors 2020-07-18 02:27:47 +02:00
Nazım Can Altınova
c45e9c86ca Add a test for const unsafe_unreachable that triggers UB 2020-07-17 22:03:33 +02:00