Files
Jacob Pratt b7c65513ba Rollup merge of #155940 - mejrs:filter, r=jdonszelmann
refactor rustc_on_unimplemented's filtering

Previously when you had a
```rust
pub struct Directive {
    pub is_rustc_attr: bool,
    pub condition: Option<OnUnimplementedCondition>,
    pub subcommands: ThinVec<Directive>,
    pub message: Option<(Span, FormatString)>,
    ...
}
```
that condition would control the emission of the message, label, notes etc. I've changed that to
```rust
pub struct Directive {
    pub is_rustc_attr: bool,
    pub filters: ThinVec<(Filter, Directive)>,
    pub message: Option<(Span, FormatString)>,
    ...
```

so that the message etc is always emitted, and there's a vec of tuples with (filter, directive) where the filter controls whether that directive is even emitted,  which i think is much clearer. That also makes it easier to not have to do the reverse iteration thing and this makes it so that notes are emitted in declaration order (with nonfiltered options always last).

The rename is because I plan on making it available to other diagnostic attributes at some point (very wip) so `OnUnimplementedCondition` and the like would have to be renamed anyway.
2026-05-03 00:25:32 -04:00
..
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2026-04-02 00:07:01 +09:00
2026-03-23 12:16:14 +01:00
2026-04-27 10:05:57 +02:00
2026-05-02 21:07:23 +08:00
2026-05-02 21:07:23 +08:00
2025-09-16 11:58:12 +01:00
2024-11-02 16:58:50 +00:00
2025-09-30 12:02:43 +02:00
2026-04-21 12:28:25 +02:00
2025-02-27 10:26:33 +00:00