1
Fork 0
rust/compiler/rustc_lint/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
..
nonstandard_style
array_into_iter.rs refactor: remove unnecessary variables 2022-09-05 22:31:02 +09:00
builtin.rs Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot 2022-09-06 03:16:29 +00:00
context.rs more clippy::perf fixes 2022-09-03 22:57:22 +02:00
early.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
enum_intrinsics_non_enums.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
errors.rs UPDATE - into_diagnostic to take a Handler instead of a ParseSess 2022-09-05 02:18:45 -04:00
expect.rs lint: port expectation diagnostics 2022-06-30 08:59:21 +01:00
hidden_unicode_codepoints.rs Rename some things related to literals. 2022-08-16 13:41:34 +10:00
internal.rs Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, r=cjgillot 2022-09-05 16:21:40 +00:00
late.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
let_underscore.rs Fix imports. 2022-08-04 17:31:08 -04:00
levels.rs Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
lib.rs Auto merge of #100574 - Urgau:check-cfg-warn-cfg, r=petrochenkov 2022-09-03 12:02:14 +00:00
methods.rs refactor: remove unnecessary variables 2022-09-05 22:31:02 +09:00
non_ascii_idents.rs lint: port non-ascii-idents diagnostics 2022-06-30 08:59:21 +01:00
non_fmt_panic.rs lint: port non-fmt-panic diagnostics 2022-06-30 08:59:21 +01:00
nonstandard_style.rs Add visitors for PatField and ExprField. 2022-08-11 21:48:39 -07:00
noop_method_call.rs separate the receiver from arguments in HIR 2022-09-05 22:25:49 +09:00
pass_by_value.rs lint: port pass-by-value diagnostics 2022-06-30 08:59:21 +01:00
passes.rs Remove Sync requirement from lint pass objects as they are created on demand 2022-08-29 10:00:22 -04:00
redundant_semicolon.rs lint: port redundant semicolons diagnostics 2022-06-30 08:59:21 +01:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs lint: port drop trait/glue diagnostics 2022-06-30 08:59:21 +01:00
types.rs separate the receiver from arguments in HIR 2022-09-05 22:25:49 +09:00
unused.rs Refactor and re-use BindingAnnotation 2022-09-02 12:55:05 -05:00