rust/compiler/rustc_lint/src
David Wood 7f91697b50 errors: implement fallback diagnostic translation
This commit updates the signatures of all diagnostic functions to accept
types that can be converted into a `DiagnosticMessage`. This enables
existing diagnostic calls to continue to work as before and Fluent
identifiers to be provided. The `SessionDiagnostic` derive just
generates normal diagnostic calls, so these APIs had to be modified to
accept Fluent identifiers.

In addition, loading of the "fallback" Fluent bundle, which contains the
built-in English messages, has been implemented.

Each diagnostic now has "arguments" which correspond to variables in the
Fluent messages (necessary to render a Fluent message) but no API for
adding arguments has been added yet. Therefore, diagnostics (that do not
require interpolation) can be converted to use Fluent identifiers and
will be output as before.
2022-04-05 07:01:02 +01:00
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs Remove a span from hir::ExprKind::MethodCall 2022-01-21 07:48:10 -06:00
builtin.rs errors: implement fallback diagnostic translation 2022-04-05 07:01:02 +01:00
context.rs span: move MultiSpan 2022-04-05 07:01:00 +01:00
early.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
enum_intrinsics_non_enums.rs initial revert 2022-01-15 01:16:55 +00:00
expect.rs errors: implement fallback diagnostic translation 2022-04-05 07:01:02 +01:00
hidden_unicode_codepoints.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
internal.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
late.rs Check lint expectations and emit lint if unfulfilled (RFC-2383) 2022-03-02 17:46:07 +01:00
levels.rs span: move MultiSpan 2022-04-05 07:01:00 +01:00
lib.rs Make LintExpectationId stable between compilation sessions (RFC-2383) 2022-03-02 17:46:08 +01:00
methods.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
non_ascii_idents.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
non_fmt_panic.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
nonstandard_style.rs rustc_lint: Remove some redundant fields from EarlyContext 2022-01-23 18:51:51 +08:00
noop_method_call.rs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
pass_by_value.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
passes.rs Do not pass hir::Crate to lints. 2021-09-30 17:39:54 +02:00
redundant_semicolon.rs Lint on redundant trailing semicolon after item 2020-12-29 16:30:02 -05:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs Rename ~const Drop to ~const Destruct 2022-03-21 17:04:03 +11:00
types.rs errors: implement fallback diagnostic translation 2022-04-05 07:01:02 +01:00
unused.rs span: move MultiSpan 2022-04-05 07:01:00 +01:00