Remove skip_arg attribute from Diagnostic and Subdiagnostic proc-macros#157070
Remove skip_arg attribute from Diagnostic and Subdiagnostic proc-macros#157070GuillaumeGomez wants to merge 2 commits into
skip_arg attribute from Diagnostic and Subdiagnostic proc-macros#157070Conversation
…c-macros, skipping fields based on whether or not they are used in error messages
|
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. Some changes occurred to the CTFE machinery
The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease Some changes occurred in match checking cc @Nadrieril |
|
I didn't expect to ping half the compiler team though. O.o |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (8f93c9d): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 15.5%, secondary -1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 512.125s -> 509.812s (-0.45%) |
There was a problem hiding this comment.
@bors r+ rollup
While this doesn't have the expected perf effect (or it does but it's not measurable), I still think getting rid of skip_arg is worthwhile as it simplifies the usage and implementation of the macro
…thanBrouwer
Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros
Instead of having users to manually add `#[skip_arg]` for each field that is not used in fluent messages, I think it's better to instead let the proc-macro only call `diag.arg("name", field)` on the fields actually used.
r? @JonathanBrouwer
…uwer Rollup of 9 pull requests Successful merges: - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157100 (Some more per owner things) - #157065 (Stabilize `Path::is_empty`) - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros) - #157088 (Improve suggestions for malformed deprecated attribute) - #157103 (Add reproducibly failing tests for parallel frontend)
…thanBrouwer
Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros
Instead of having users to manually add `#[skip_arg]` for each field that is not used in fluent messages, I think it's better to instead let the proc-macro only call `diag.arg("name", field)` on the fields actually used.
r? @JonathanBrouwer
…uwer Rollup of 11 pull requests Successful merges: - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros) - #157088 (Improve suggestions for malformed deprecated attribute) - #157103 (Add reproducibly failing tests for parallel frontend) Failed merges: - #157100 (Some more per owner things)
|
@bors r- |
|
This pull request was unapproved. This PR was contained in a rollup (#157113), which was unapproved. |
Instead of having users to manually add
#[skip_arg]for each field that is not used in fluent messages, I think it's better to instead let the proc-macro only calldiag.arg("name", field)on the fields actually used.r? @JonathanBrouwer