Simplify parse_limited#155447
Conversation
parse_limited and cleanup more attribute parsingparse_limited
25d63eb to
8bc2d3c
Compare
| { | ||
| // `UnknownDiagnosticAttribute` is emitted in rustc_resolve/macros.rs | ||
| return; | ||
| } |
There was a problem hiding this comment.
There are a couple of rustc_resolve types that have a pub on_unknown_attr: Option<OnUnknownData> field.
This change makes it so they can be Some even if the feature is not used. The reason you aren't noticing it is because of this check at the use site:
rust/compiler/rustc_resolve/src/imports.rs
Lines 849 to 851 in 4dbafc3
I'm on the fence whether it's worth the effort to "fix" this. But I would like some comments here and there to document whatever we end up with.
There was a problem hiding this comment.
I've moved the feature gating to the initialization of on_unknown_attr, and added some comments
8bc2d3c to
a5d0719
Compare
|
Some changes occurred to diagnostic attributes. cc @mejrs Some changes occurred in compiler/rustc_attr_parsing |
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? @mejrs |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Simplify `parse_limited`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (3a904ef): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 493.313s -> 493.585s (0.06%) |
a5d0719 to
e0d7848
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=mejrs rollup |
…ited, r=mejrs Simplify `parse_limited` Removes unnecessary arguments from `parse_limited` and cleans up feature gating of `on_unknown_attr`
…uwer Rollup of 10 pull requests Successful merges: - #150230 (spec next chunk for trustedlen) - #155284 (net::tcp/udp: fix docs about how set_nonblocking is implemented) - #146870 (fix: add aliasing rules for Box) - #154003 (Make std::fs::File Send on UEFI) - #155187 (std: fix HashMap RNG docs wording) - #155255 (Document why `layout.align() + layout.size()` doesn't overflow) - #155351 (Reorganize tests from `tests/ui/issues/`) - #155406 (std: Update dependency on `wasi` crate) - #155447 (Simplify `parse_limited`) - #155481 (Delete `SizeSkeleton::Generic`)
Rollup merge of #155447 - JonathanBrouwer:simplify-parse-limited, r=mejrs Simplify `parse_limited` Removes unnecessary arguments from `parse_limited` and cleans up feature gating of `on_unknown_attr`
View all comments
Removes unnecessary arguments from
parse_limitedand cleans up feature gating ofon_unknown_attr