Rustc flag to control "the full name for the type has been written to _" output?

When an error or warning features a long type, rustc writes it to a file with a note of this kind:

= note: the full name for the type has been written to AAAA.long-type-HHHH.txt

How can I disable that writing to an extra file?

My use case is I've got a test suite that involves running rustc on both valid and invalid rust files and I'd prefer not having such files appear every time I run my test suite.

It's worth nothing that --error-format=short does not disable this behavior.

You can use either --verbose as noted in the rustc output or (on nightly) -Zwrite-long-types-to-disk=no.

1 Like