Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #31838 - aochagavia:trans, r=nrc
Refactor rustc_trans::save to allow other backends than CSV r? @nrc Things done: * Moved `(.*)Data` structs to an own module, so they can be imported easily (`use data::*`). * Created a `Dump` trait with callbacks for dumping items. * Refactored `DumpCsvVisitor` to use an implementor of `Dump` instead of dumping as CSV. Renamed it to `DumpVisitor`. * Created a `DumpCsv` struct that implements `Dump` and serializes items as CSV. I tried to extract some of the logic contained in `FmtStr` and `Recorder`, such as normalization of ids (I put it in `DumpVisitor`). I think it makes sense to provide the same information to other implementors of `Dump`, instead of normalizing only for `DumpCsv`. However, there is still some logic related to spans implemented only for `DumpCsv`. I just thought it would be better to merge this as soon as possible, since there are so much changes, and fix this afterwards.
- Loading branch information