mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-08 16:07:43 +00:00
![]() 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:  |
||
---|---|---|
.. | ||
auxiliary | ||
bad-annotation.rs | ||
bad-annotation.stderr | ||
expected-comma-found-token.rs | ||
expected-comma-found-token.stderr | ||
feature-gate-on-unimplemented.rs | ||
feature-gate-on-unimplemented.stderr | ||
no-debug.rs | ||
no-debug.stderr | ||
on-trait.rs | ||
on-trait.stderr | ||
parent-label.rs | ||
parent-label.stderr | ||
slice-index.rs | ||
slice-index.stderr | ||
suggest_tuple_wrap_root_obligation.rs | ||
suggest_tuple_wrap_root_obligation.stderr | ||
suggest_tuple_wrap.rs | ||
suggest_tuple_wrap.stderr | ||
sum.rs | ||
sum.stderr | ||
use_self_no_underscore.rs | ||
use_self_no_underscore.stderr |