about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-11 04:49:56 +0000
committerbors <bors@rust-lang.org>2024-09-11 04:49:56 +0000
commit4c5fc2c334f1cc305eea79ed0b8fdb276342d101 (patch)
tree9f750c44cc8682bbf4ea1db3056fa169c9b98143 /compiler/rustc_parse/src
parenta9fb00bfa4b3038c855b2097b54e05e8c198c183 (diff)
parent6dfc4033be7c7d9f6551b2db093fd3bdbbc45cc2 (diff)
downloadrust-4c5fc2c334f1cc305eea79ed0b8fdb276342d101.tar.gz
rust-4c5fc2c334f1cc305eea79ed0b8fdb276342d101.zip
Auto merge of #130050 - cjgillot:expect-attr-id, r=fee1-dead
Enumerate lint expectations using AttrId

This PR implements the idea I outlined in https://github.com/rust-lang/rust/issues/127884#issuecomment-2240338547

We can uniquely identify a lint expectation `#[expect(lint0, lint1...)]` using the `AttrId` and the index of the lint inside the attribute. This PR uses this property in `check_expectations`.

In addition, this PR stops stashing expected diagnostics to wait for the unstable -> stable `LintExpectationId` mapping: if the lint is emitted with an unstable attribute, it must have been emitted by an `eval_always` query (like inside the resolver), so won't be loaded from cache. Decoding an `AttrId` from the on-disk cache ICEs, so we have no risk of accidentally checking an expectation.

Fixes https://github.com/rust-lang/rust/issues/127884

cc `@xFrednet`
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions