Description
I've unified (I think) the long type output file in
note_obligation_cause_code
, and moved the filename note to the end ofnote_obligation_cause_code
. The long type output file probably should be passed even further up the call chain. Although further up in the call chain, there are also various instances of scattered output file / filename notes (esp. inrustc_hir_typeck
) which probably should eventually be somehow unified too (probably not in this PR).
Originally posted by @jieyouxu in #121739 (comment)
In rustc_hir_typeck
and probably in more places, there are random scattered logic for writing long type names to disk. Last I tried to modify them in #121739, I discovered that:
- Where and how these long type name files are created is inconsistent.
- There are probably multiple places where different files are created, which can cause multiple long type name files to emitted if you aren't careful.
- AFAICT, they might not properly respect
--remap-path-prefix
and such. - Not sure if this is problematic for reproducibility, probably not.
It's probably better if we tried to unify the long type name written to disk so they are treated consistently and to avoid the duplicate type name file output footguns. This could potentially aid in addressing #129296.