-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Cleanup of #[derive(Diagnostic)] attribute parsers
#151657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
9f11d3b to
e38bc5a
Compare
This comment has been minimized.
This comment has been minimized.
e38bc5a to
2e8347a
Compare
|
cc @davidtwco, @TaKO8Ki |
hm, do we still need this notification?
yep, i think so too
i'll take a closer look tomorrow, but i'm pretty sure that's all fine <3 |
Afaik these notifications are for people who want to know if certain directories change, whether it is needed is mostly for them to decide. There is no further expectations such as waiting for their review. Actually just added myself to the list, cause I'm now also interested in changes of these files #151800 |
oh, that's nice, thanks for keeping an eye on it |
|
ok, nice, thanks for working on it! @bors r+ rollup |
Rollup of 5 pull requests Successful merges: - #151775 (Portable SIMD subtree update) - #151488 (Tweak E0599 to consolidate unsatisfied trait bound messages) - #149823 (fix(parser): Disallow CR in frontmatter ) - #151475 (add foregin type tests for issue 64458) - #151657 (Cleanup of `#[derive(Diagnostic)]` attribute parsers)
Rollup merge of #151657 - JonathanBrouwer:diag2, r=Kivooeo Cleanup of `#[derive(Diagnostic)]` attribute parsers This PR does a lot of refactoring on the implementation of `#[derive(Diagnostic)]`. It should have no observable effect other than error messages for incorrect usage of the attributes. In general, I think the error messages got better. This PR can be reviewed commit by commit, each commit passes the tests. - [Convert parse_nested_meta to parse_args_with for #[diagnostic]](9e61014) Start parsing `#[diagnostic]` using `syn`'s `parse_args_with` function instead of `parse_nested_meta`. This improves error messages and prepares for the new syntax needed for #151366 which cannot be parsed using `parse_args_with`. - [Convert parse_nested_meta to parse_args_with for #[subdiagnostic]](5d21a21) Same as above but for `#[subdiagnostic]` - [Remove unused no_span option](0bf3f5d) Removes the `no_span` option of `#[suggestion]`, which there were no tests for and which seems to have been unused. If needed again in the future, this can be re-added pretty easily, but I find that unlikely. - [Remove HasFieldMap trait in favour of passing FieldMap directly](2e8347a) Removes the `HasFieldMap` trait, because I don't really see the point of having a trait "has a field map" if we can just pass the fieldmap itself instead. r? @Kivooeo (Thanks for reviewing my PRs so far :3)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#151775 (Portable SIMD subtree update) - rust-lang/rust#151488 (Tweak E0599 to consolidate unsatisfied trait bound messages) - rust-lang/rust#149823 (fix(parser): Disallow CR in frontmatter ) - rust-lang/rust#151475 (add foregin type tests for issue 64458) - rust-lang/rust#151657 (Cleanup of `#[derive(Diagnostic)]` attribute parsers)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#151775 (Portable SIMD subtree update) - rust-lang/rust#151488 (Tweak E0599 to consolidate unsatisfied trait bound messages) - rust-lang/rust#149823 (fix(parser): Disallow CR in frontmatter ) - rust-lang/rust#151475 (add foregin type tests for issue 64458) - rust-lang/rust#151657 (Cleanup of `#[derive(Diagnostic)]` attribute parsers)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#151775 (Portable SIMD subtree update) - rust-lang/rust#151488 (Tweak E0599 to consolidate unsatisfied trait bound messages) - rust-lang/rust#149823 (fix(parser): Disallow CR in frontmatter ) - rust-lang/rust#151475 (add foregin type tests for issue 64458) - rust-lang/rust#151657 (Cleanup of `#[derive(Diagnostic)]` attribute parsers)
This PR does a lot of refactoring on the implementation of
#[derive(Diagnostic)]. It should have no observable effect other than error messages for incorrect usage of the attributes. In general, I think the error messages got better.This PR can be reviewed commit by commit, each commit passes the tests.
Start parsing
#[diagnostic]usingsyn'sparse_args_withfunction instead ofparse_nested_meta. This improves error messages and prepares for the new syntax needed for Tracking issue for MCP 959: Remove the fluent files #151366 which cannot be parsed usingparse_args_with.Same as above but for
#[subdiagnostic]Removes the
no_spanoption of#[suggestion], which there were no tests for and which seems to have been unused. If needed again in the future, this can be re-added pretty easily, but I find that unlikely.Removes the
HasFieldMaptrait, because I don't really see the point of having a trait "has a field map" if we can just pass the fieldmap itself instead.r? @Kivooeo
(Thanks for reviewing my PRs so far :3)