rust/compiler/rustc_lint/src
bors a57117982a Auto merge of #95542 - xFrednet:rfc-2383-expect-query, r=wesleywiser
Support tool lints with the `#[expect]` attribute (RFC 2383)

This PR fixes the ICE https://github.com/rust-lang/rust/issues/94953 by making the assert for converted expectation IDs conditional.

Additionally, it moves the lint expectation check into a separate query to support rustdoc and other tools. On the way, I've also added some tests to ensure that the attribute works for Clippy and rustdoc lints.

The number of changes comes from the long test file. This may look like a monster PR, this may smell like a monster PR and this may be a monster PR, but it's a harmless monster. 🦕

---

Closes: https://github.com/rust-lang/rust/issues/94953

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

r? `@wesleywiser`

cc: `@rust-lang/rustdoc`
2022-05-09 00:02:55 +00:00
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs errors: span_suggestion takes impl ToString 2022-04-29 02:05:20 +01:00
builtin.rs Track if a where bound comes from a impl Trait desugar 2022-05-07 17:10:30 +02:00
context.rs errors: span_suggestion takes impl ToString 2022-04-29 02:05:20 +01:00
early.rs Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
enum_intrinsics_non_enums.rs initial revert 2022-01-15 01:16:55 +00:00
expect.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
hidden_unicode_codepoints.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
internal.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
late.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
levels.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
lib.rs Move lint expectation checking into a separate query (RFC 2383) 2022-05-08 14:37:14 +02:00
methods.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
non_ascii_idents.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
non_fmt_panic.rs Make rustc_parse_format compile on stable 2022-05-03 11:26:58 +02:00
nonstandard_style.rs Stop visiting visibility. 2022-04-23 09:53:45 +02:00
noop_method_call.rs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
pass_by_value.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
passes.rs Do not pass hir::Crate to lints. 2021-09-30 17:39:54 +02:00
redundant_semicolon.rs Lint on redundant trailing semicolon after item 2020-12-29 16:30:02 -05:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs Rename ~const Drop to ~const Destruct 2022-03-21 17:04:03 +11:00
types.rs rustc: Panic by default in DefIdTree::parent 2022-05-02 01:56:50 +03:00
unused.rs span: move MultiSpan 2022-04-05 07:01:00 +01:00