diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-20 16:47:42 +0100 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2023-07-24 12:25:05 +0100 |
| commit | 8df39667dcc802a152ca0fe0b85e51a7b6788b82 (patch) | |
| tree | 88202e8e65cdd40e7d483b904d99a9476be3e1bc /compiler/rustc_session/src/options.rs | |
| parent | 33a2c2487ac5d9927830ea4c1844335c6b9f77db (diff) | |
| download | rust-8df39667dcc802a152ca0fe0b85e51a7b6788b82.tar.gz rust-8df39667dcc802a152ca0fe0b85e51a7b6788b82.zip | |
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.
Diffstat (limited to 'compiler/rustc_session/src/options.rs')
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 87d67c099ce..a317cc2c134 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1875,6 +1875,8 @@ written to standard error output)"), Requires `-Clto[=[fat,yes]]`"), wasi_exec_model: Option<WasiExecModel> = (None, parse_wasi_exec_model, [TRACKED], "whether to build a wasi command or reactor"), + write_long_types_to_disk: bool = (true, parse_bool, [UNTRACKED], + "whether long type names should be written to files instead of being printed in errors"), // tidy-alphabetical-end // If you add a new option, please update: |
