rust/compiler/rustc_lint
bors 4c5fc2c334 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`
2024-09-11 04:49:56 +00:00
..
src Auto merge of #130050 - cjgillot:expect-attr-id, r=fee1-dead 2024-09-11 04:49:56 +00:00
Cargo.toml non_local_defs: point to Self and Trait to give more context 2024-05-27 23:59:18 +02:00
messages.ftl Rollup merge of #126452 - compiler-errors:raw-lifetimes, r=spastorino 2024-09-07 23:30:10 +02:00