rust/compiler/rustc_expand/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
..
mbe remove unnecessary to_string and String::new 2022-06-13 15:48:40 +09:00
mut_visit rustc_ast: Turn MutVisitor::token_visiting_enabled into a constant 2021-10-18 00:23:24 +03:00
parse use CursorRef more, to not to clone Trees 2022-05-18 18:43:48 +03:00
tokenstream use CursorRef more, to not to clone Trees 2022-05-18 18:43:48 +03:00
base.rs remove unnecessary to_string and String::new 2022-06-13 15:48:40 +09:00
build.rs Basic compiler infra 2022-06-02 09:00:04 -03:00
config.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
expand.rs remove unnecessary to_string and String::new 2022-06-13 15:48:40 +09:00
lib.rs Never regard macro rules with compile_error! invocations as unused 2022-06-09 23:21:06 +02:00
mbe.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
module.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
placeholders.rs Save colon span to suggest bounds. 2022-04-30 13:55:17 +02:00
proc_macro.rs proc_macro: don't pass a client-side function pointer through the server. 2022-05-27 19:29:21 +00:00
proc_macro_server.rs Support lint expectations for --force-warn lints (RFC 2383) 2022-06-16 08:16:43 +02:00
tests.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00