os-rust/tests/ui-fulldeps/internal-lints
Nicholas Nethercote f6f8779843 Reduce capabilities of Diagnostic.
Currently many diagnostic modifier methods are available on both
`Diagnostic` and `DiagnosticBuilder`. This commit removes most of them
from `Diagnostic`. To minimize the diff size, it keeps them within
`diagnostic.rs` but changes the surrounding `impl Diagnostic` block to
`impl DiagnosticBuilder`. (I intend to move things around later, to give
a more sensible code layout.)

`Diagnostic` keeps a few methods that it still needs, like `sub`,
`arg`, and `replace_args`.

The `forward!` macro, which defined two additional methods per call
(e.g. `note` and `with_note`), is replaced by the `with_fn!` macro,
which defines one additional method per call (e.g. `with_note`). It's
now also only used when necessary -- not all modifier methods currently
need a `with_*` form. (New ones can be easily added as necessary.)

All this also requires changing `trait AddToDiagnostic` so its methods
take `DiagnosticBuilder` instead of `Diagnostic`, which leads to many
mechanical changes. `SubdiagnosticMessageOp` gains a type parameter `G`.

There are three subdiagnostics -- `DelayedAtWithoutNewline`,
`DelayedAtWithNewline`, and `InvalidFlushedDelayedDiagnosticLevel` --
that are created within the diagnostics machinery and appended to
external diagnostics. These are handled at the `Diagnostic` level, which
means it's now hard to construct them via `derive(Diagnostic)`, so
instead we construct them by hand. This has no effect on what they look
like when printed.

There are lots of new `allow` markers for `untranslatable_diagnostics`
and `diagnostics_outside_of_impl`. This is because
`#[rustc_lint_diagnostics]` annotations were present on the `Diagnostic`
modifier methods, but missing from the `DiagnosticBuilder` modifier
methods. They're now present.
2024-02-20 13:22:17 +11:00
..
bad_opt_access.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad_opt_access.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default_hash_types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
default_hash_types.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
diagnostics.ftl errors: generate typed identifiers in each crate 2023-02-22 09:15:53 +00:00
diagnostics.rs Reduce capabilities of Diagnostic. 2024-02-20 13:22:17 +11:00
diagnostics.stderr Reduce capabilities of Diagnostic. 2024-02-20 13:22:17 +11:00
lint_pass_impl_without_macro.rs Remove rustc_lint_defs::lint_array 2023-09-28 23:01:25 +02:00
lint_pass_impl_without_macro.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
qualified_ty_ty_ctxt.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
qualified_ty_ty_ctxt.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
query_stability.rs add missing potential_query_instability for keys and values in hashmap 2024-01-30 12:43:10 +08:00
query_stability.stderr add missing potential_query_instability for keys and values in hashmap 2024-01-30 12:43:10 +08:00
rustc_pass_by_value.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
rustc_pass_by_value.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
span_use_eq_ctxt.rs Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
span_use_eq_ctxt.stderr Remove ignore-stage1 that was added when changing error count msg 2024-01-06 12:53:06 +01:00
ty_tykind_usage.rs Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs 2024-02-06 02:22:58 +00:00
ty_tykind_usage.stderr Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs 2024-02-06 02:22:58 +00:00