about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/errors.rs
AgeCommit message (Collapse)AuthorLines
2023-02-22errors: generate typed identifiers in each crateDavid Wood-3/+3
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-01-09refactor: cleanupRejyr-2/+0
2023-01-09migrate: `levels.rs`Rejyr-2/+2
2023-01-09add: `lints` for `errors.rs`Rejyr-1/+3
2023-01-09migrate: `early.rs` and `enum_intrinsics_non_enums.rs`Rejyr-0/+1
2022-10-26Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]Xiretza-1/+1
Using the following command: find compiler/ -type f -name '*.rs' -exec perl -i -gpe \ 's/(#\[\w*suggestion)_(short|verbose|hidden)\(\s*(\S+,)?/\1(\3style = "\2",/g' \ '{}' +
2022-10-23Migrate all diagnosticsNilstrieb-17/+17
2022-10-17lint: use derive moreDavid Wood-23/+2
Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-10errors: `AddToDiagnostic::add_to_diagnostic_with`David Wood-3/+12
`AddToDiagnostic::add_to_diagnostic_with` is similar to the previous `AddToDiagnostic::add_to_diagnostic` but takes a function that can be used by the caller to modify diagnostic messages originating from the subdiagnostic (such as performing translation eagerly). `add_to_diagnostic` now just calls `add_to_diagnostic_with` with an empty closure. Signed-off-by: David Wood <david.wood@huawei.com>
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-1/+1
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename SessionSubdiagnostic macro to SubdiagnosticJhonny Bill Mena-2/+2
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21UPDATE - rename DiagnosticHandler macro to DiagnosticJhonny Bill Mena-9/+9
2022-09-21UPDATE - rename AddSubdiagnostic trait to AddToDiagnosticJhonny Bill Mena-3/+3
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-11/+11
2022-09-21UPDATE - move SessionDiagnostic from rustc_session to rustc_errorsJhonny Bill Mena-2/+2
2022-09-05UPDATE - into_diagnostic to take a Handler instead of a ParseSessJhonny Bill Mena-4/+4
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 this is the best way to address this gap
2022-08-22refactor: migrate to kind-less `SessionDiagnostic` derivesRejyr-8/+8
2022-08-22migrate: `rustc_lint::context`Rejyr-1/+81
2022-08-22rename: `UnknownTool` to `UnknownToolInScopedLint`Rejyr-2/+2
2022-08-22migrate: `BuiltinEllipsisInclusiveRangePatterns`Rejyr-0/+10
2022-08-22migrate: `OverruledAttribute`Rejyr-0/+40
2022-08-22hotfix: add missing importRejyr-1/+1
2022-08-22change: diagnostic `String` field to `Symbol`Rejyr-1/+1
2022-08-22migrate: `bad_attr` to `SessionDiagnostic`Rejyr-1/+20
2022-08-22migrate: `UnknownTool` error to `SessionDiagnostic`Rejyr-0/+13