diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2025-05-05 00:20:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-05 00:20:57 -0400 |
| commit | e9a50b8a0a01808ff135b2706d6f7093789c02e3 (patch) | |
| tree | 31896d7eccdb1163eaf2149298e6a92b6b5402cb /compiler/rustc_codegen_gcc/src/attributes.rs | |
| parent | c44e1d65f3fad44e8ca617335fb322f8eb6d0bef (diff) | |
| parent | 4671081bdbc73d35a465a150937b6d0ecd26087f (diff) | |
| download | rust-e9a50b8a0a01808ff135b2706d6f7093789c02e3.tar.gz rust-e9a50b8a0a01808ff135b2706d6f7093789c02e3.zip | |
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:

Diffstat (limited to 'compiler/rustc_codegen_gcc/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions
