1
Fork 0
rust/compiler/rustc_monomorphize/src
Guillaume Gomez 4d830b7775
Rollup merge of #101434 - JhonnyBillM:replace-session-for-handler-in-into-diagnostic, r=davidtwco
Update `SessionDiagnostic::into_diagnostic` to take `Handler` instead of `ParseSess`

Suggested by the team in [this Zulip Topic](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20SessionDiagnostic.20on.20Handler).

`Handler` already has almost all the capabilities of `ParseSess` when it comes to diagnostic emission, in this migration we only needed to add the ability to access `source_map` from the emitter in order to get a `Snippet` and the `start_point`. Not sure if adding these two methods [`span_to_snippet_from_emitter` and  `span_start_point_from_emitter`] is the best way to address this gap.

P.S. If this goes in the right direction, then we probably may want to move `SessionDiagnostic` to `rustc_errors` and rename it to `DiagnosticHandler` or something similar.

r? `@davidtwco`
r? `@compiler-errors`
2022-09-06 17:00:26 +02:00
..
partitioning Rollup merge of #100730 - CleanCut:diagnostics-rustc_monomorphize, r=davidtwco 2022-08-31 14:29:51 +02:00
collector.rs Make const_eval_select a real intrinsic 2022-09-04 20:35:23 +08:00
errors.rs UPDATE - into_diagnostic to take a Handler instead of a ParseSess 2022-09-05 02:18:45 -04:00
lib.rs rebased: convert rustc_monomorphize errors to SessionDiagnostic 2022-08-25 11:06:32 -06:00
polymorphize.rs tracing::instrument cleanup 2022-09-01 14:54:27 +00:00
util.rs Fix a bunch of typo 2022-08-31 18:24:55 +08:00