about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/expect.rs
AgeCommit message (Collapse)AuthorLines
2023-01-13Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillotbors-1/+1
Feed a bunch of queries instead of tracking fields on TyCtxt r? `@cjgillot` pulled out of https://github.com/rust-lang/rust/pull/105462
2023-01-12Feed the `features_query` instead of grabbing it from the session lazilyOli Scherer-1/+1
2023-01-09refactor: cleanupRejyr-2/+0
2023-01-09refactor: refactor to derive for some lints.Rejyr-2/+4
2023-01-09migrate: `expect.rs`Rejyr-29/+11
2022-10-23Migrate all diagnosticsNilstrieb-2/+2
2022-10-01Compute `lint_levels` by definitionDeadbeef-1/+3
2022-10-01Refactor rustc lint APIMaybe Waffle-5/+5
2022-09-22Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"Camille GILLOT-3/+1
This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c.
2022-09-14Compute `lint_levels` by definitionDeadbeef-1/+3
2022-06-30lint: port expectation diagnosticsDavid Wood-2/+3
Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-16Support lint expectations for `--force-warn` lints (RFC 2383)xFrednet-8/+8
2022-05-08Move lint expectation checking into a separate query (RFC 2383)xFrednet-2/+10
2022-04-05errors: implement fallback diagnostic translationDavid Wood-1/+1
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-03-07Handle `#[expect(unfulfilled_lint_expectations)]` with a lint messagexFrednet-4/+5
2022-03-02Use Vec for expectations to have a constant order (RFC-2383)xFrednet-3/+1
2022-03-02Added `panics` for unreachable states for expectations (RFC 2383)xFrednet-0/+2
2022-03-02Emit `unfullfilled_lint_expectation` using a `HirId` for performance (RFC-2383)xFrednet-13/+16
2022-03-02Add UI tests for the `expect` attribute (RFC-2383)xFrednet-4/+2
* Add UI tests with macros for the `expect` attribute (RFC-2383) * Addressed review comments - mostly UI test updates (RFC-2383) * Documented lint level attribute on macro not working bug (RFC-2383) See `rust#87391`
2022-03-02Make `LintExpectationId` stable between compilation sessions (RFC-2383)xFrednet-1/+1
2022-03-02Check lint expectations and emit lint if unfulfilled (RFC-2383)xFrednet-0/+48