rust/tests/ui/on-unimplemented
Trevor Gross e9a50b8a0a
Rollup merge of #140307 - mejrs:condition_parser, r=nnethercote
Refactor rustc_on_unimplemented's filter parser

Followup to https://github.com/rust-lang/rust/pull/139091; I plan on moving most of this code into `rustc_attr_parsing` at some point, but want to land this separately first.

I have taken care to preserve the original behavior as much as I could:
- All but one of the new error variants are replacements for the ones originally emitted by the cfg parsing machinery; so these errors are not "new".
- the `InvalidFlag` variant is new, this PR turns this (from being ignored and silently doing nothing) into an error:
    ```rust
    #[rustc_on_unimplemented(on(something, message = "y"))]
    //~^ ERROR invalid boolean flag
    //~^^ NOTE expected one of `crate_local`, `direct` or `from_desugaring`, not `something`
    trait InvalidFlag {}
    ```
    This does not occur anywhere except in this test. I couldn't find a way that I liked to keep allowing this or to do nothing, erroring was the cleanest solution.
- There are a bunch of FIXME throughout this and the previous PR, I plan on addressing those in follow up prs..

Finally, this gets rid of the "longest" dependency in rustc:
![image](https://github.com/user-attachments/assets/3c3eb3a0-b7b3-40d9-aada-a752e28c8678)
2025-05-05 00:20:57 -04:00
..
auxiliary
bad-annotation.rs Refactor rustc_on_unimplemented's filter parser 2025-05-02 22:08:35 +02:00
bad-annotation.stderr Refactor rustc_on_unimplemented's filter parser 2025-05-02 22:08:35 +02:00
expected-comma-found-token.rs Fix comment describing what the test does 2025-04-29 12:19:55 +02:00
expected-comma-found-token.stderr Fix comment describing what the test does 2025-04-29 12:19:55 +02:00
feature-gate-on-unimplemented.rs
feature-gate-on-unimplemented.stderr Bless tests 2024-01-13 12:46:58 -05:00
no-debug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-debug.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
on-trait.rs
on-trait.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
parent-label.rs
parent-label.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
slice-index.rs
slice-index.stderr Implement SliceIndex for ByteStr 2025-03-11 20:26:10 -07:00
suggest_tuple_wrap_root_obligation.rs Suggest creating unary tuples 2024-11-04 12:06:19 +01:00
suggest_tuple_wrap_root_obligation.stderr Suggest creating unary tuples 2024-11-04 12:06:19 +01:00
suggest_tuple_wrap.rs Suggest creating unary tuples 2024-11-04 12:06:19 +01:00
suggest_tuple_wrap.stderr Suggest creating unary tuples 2024-11-04 12:06:19 +01:00
sum.rs
sum.stderr Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00
use_self_no_underscore.rs Test that Self properly works in filters 2025-04-14 00:12:37 +02:00
use_self_no_underscore.stderr Test that Self properly works in filters 2025-04-14 00:12:37 +02:00