rust/compiler/rustc_session/src
Matthias Krüger 95be954af4
Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995
Support lint expectations for `--force-warn` lints (RFC 2383)

Rustc has a `--force-warn` flag, which overrides lint level attributes and forces the diagnostics to always be warn. This means, that for lint expectations, the diagnostic can't be suppressed as usual. This also means that the expectation would not be fulfilled, even if a lint had been triggered in the expected scope.

This PR now also tracks the expectation ID in the `ForceWarn` level. I've also made some minor adjustments, to possibly catch more bugs and make the whole implementation more robust.

This will probably conflict with https://github.com/rust-lang/rust/pull/97718. That PR should ideally be reviewed and merged first. The conflict itself will be trivial to fix.

---

r? `@wesleywiser`

cc: `@flip1995` since you've helped with the initial review and also discussed this topic with me. 🙃

Follow-up of: https://github.com/rust-lang/rust/pull/87835

Issue: https://github.com/rust-lang/rust/issues/85549

Yeah, and that's it.
2022-06-16 09:10:20 +02:00
..
cgu_reuse_tracker.rs Prettify rustc_session fmt with capturing args (nfc) 2022-03-24 22:38:13 -07:00
code_stats.rs Vigorously refactor _session::code_stats (nfc) 2022-03-24 22:38:16 -07:00
config.rs Support lint expectations for --force-warn lints (RFC 2383) 2022-06-16 08:16:43 +02:00
cstore.rs Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
filesearch.rs Prettify rustc_session fmt with capturing args (nfc) 2022-03-24 22:38:13 -07:00
lib.rs lint: add diagnostic translation migration lints 2022-06-10 15:50:06 +01:00
options.rs Auto merge of #96285 - flip1995:pk-vfe, r=nagisa 2022-06-14 21:37:11 +00:00
output.rs Use a let-chain in _session::output (nfc) 2022-03-24 22:38:32 -07:00
parse.rs lint: add diagnostic translation migration lints 2022-06-10 15:50:06 +01:00
search_paths.rs incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
session.rs Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995 2022-06-16 09:10:20 +02:00
utils.rs rustc_parse: Move AST -> TokenStream conversion logic to rustc_ast 2022-05-22 12:01:07 +03:00