Commit Graph

14 Commits

Author SHA1 Message Date
Fernando Fernandez Mancera e35481f90b Suggest using --verbose when writing type to a file 2024-02-20 23:48:59 +01:00
许杰友 Jieyou Xu (Joe) ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
Oli Scherer eab2adb660 Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
Rajveer af44e719fa Switch from using `//~ERROR` annotations with `--error-format` to `error-pattern`
Resolves Issue #118752
2023-12-21 16:45:29 +05:30
Esteban Küber 9d846fcc11 Tweak `short_ty_string` to reduce number of files
When shortening types and writing them to disk, make `short_ty_string`
capable of reusing the same file, instead of writing a file per
shortened type.
2023-12-13 23:07:10 +00:00
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Jeremy Fitzhardinge 8f0845862c Use `$message_type` as the tag
`type` turned out to be controversial.
2023-10-13 15:50:01 -07:00
Jeremy Fitzhardinge 5c8170656b Add `type` field to json diagnostic outputs
Currently the json-formatted outputs have no way to unambiguously
determine which kind of message is being output. A consumer can look for
specific fields in the json object (eg "message"), but there's no
guarantee that in future some other kind of output will have a field of
the same name.

This PR adds a `"type"` field to add json outputs which can be used to
unambiguously determine which kind of output it is. The mapping is:

diagnostic: regular compiler diagnostics
artifact: artifact notifications
future_incompat: Report of future incompatibility
unused_extern: Unused crate warnings/errors

This matches the "internally tagged" representation for serde enums.
2023-09-19 14:17:02 -07:00
Mahdi Dibaiee 8df39667dc new unstable option: -Zwrite-long-types-to-disk
This option guards the logic of writing long type names in files and
instead using short forms in error messages in rustc_middle/ty/error
behind a flag. The main motivation for this change is to disable this
behaviour when running ui tests.

This logic can be triggered by running tests in a directory that has a
long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/

This means ui tests can fail depending on how long the path to their
file is.

Some ui tests actually rely on this behaviour for their assertions,
so for those we enable the flag manually.
2023-07-24 12:25:05 +01:00
Michael Goulet 14bf909e71 Note base types of coercion 2023-05-12 00:10:52 +00:00
pommicket b82608aa56 Create AnnotationColumn struct to fix hard tab column numbers in errors 2023-03-28 09:18:55 -04:00
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00
Esteban Küber f1ffe823cf Hide more of long types in E0271
Fix #40186.
2023-01-11 21:40:39 +00:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00