Store the names of Fn trait parameters in the AST, fix rustfmt bug - #160937
Conversation
|
cc @rust-lang/clippy The parser was modified, potentially altering the grammar of (stable) Rust cc @fmease
cc @rust-lang/rustfmt |
|
r? @ytmimi rustbot has assigned @ytmimi. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@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.
Store the names of `Fn` trait parameters in the AST, fix rustfmt bug
This comment has been minimized.
This comment has been minimized.
|
@JonathanBrouwer Thank you, again. I took a look at the rustfmt code changes and they all look very straightforward to me. Having the rustfmt target test case there will help us avoid any regressions and make sure that the formatting stays idempotent. Assuming that CI passes and the timing run doesn't show any performance impacts from this change you can |
|
Finished benchmarking commit (0051041): 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 2.2%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 455.693s -> 460.326s (1.02%) |
|
@bors r=ytmimi rollup |
Store the names of `Fn` trait parameters in the AST, fix rustfmt bug This PR stores the name of a `Fn` trait parameters in the AST. This is needed because * rustfmt needs to rewrite it. * this will also be needed in a follow-up PR to do semantic validation. This PR is split up in commits for reviewability: * `Make inputs to ParenthesizedArgs a ThinVec<Param> in the compiler` changes the AST datatypes, should have no observable effect * `Fix errors in tooling` deals with the consequenses of the first commit in tooling, should have no observable effect * `Improve rewrite_generic_args to take pattern into account` fixes rust-lang/rustfmt#7021 * `Add rustfmt regression test` regression test for rust-lang/rustfmt#7021 I have not worked in the rustfmt codebase before so please review this part carefully. Tracking issue: rust-lang#158499 cc @ytmimi @JohnTitor
Store the names of `Fn` trait parameters in the AST, fix rustfmt bug This PR stores the name of a `Fn` trait parameters in the AST. This is needed because * rustfmt needs to rewrite it. * this will also be needed in a follow-up PR to do semantic validation. This PR is split up in commits for reviewability: * `Make inputs to ParenthesizedArgs a ThinVec<Param> in the compiler` changes the AST datatypes, should have no observable effect * `Fix errors in tooling` deals with the consequenses of the first commit in tooling, should have no observable effect * `Improve rewrite_generic_args to take pattern into account` fixes rust-lang/rustfmt#7021 * `Add rustfmt regression test` regression test for rust-lang/rustfmt#7021 I have not worked in the rustfmt codebase before so please review this part carefully. Tracking issue: rust-lang#158499 cc @ytmimi @JohnTitor
…uwer Rollup of 14 pull requests Successful merges: - #160620 (Do not pass `-no-pie` on Windows) - #160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - #160760 (Miri: give the incremental session a chance to finish) - #160854 (Add -Zwasm-proc-macros flag) - #160868 (std: Adjust cfgs again for TLS on WASI) - #160894 (Allow running an arbitrary number of try jobs per PR) - #160790 (rustc-book: update sys-v abi link) - #160878 (Add rust_analyzer to check-cfg names) - #160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - #160920 (No longer mention the removed generic) - #160921 (rustdoc: Fix invalid CSS classes generated for notable items) - #160924 (split up `rustc_session`) - #160934 (Ensure TLS accesses don't call the global allocator through panic) - #160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Rollup of 14 pull requests Successful merges: - #160620 (Do not pass `-no-pie` on Windows) - #160731 (Arc: Remove unnecessary fmt::Display use for overflow assertion) - #160854 (Add -Zwasm-proc-macros flag) - #160868 (std: Adjust cfgs again for TLS on WASI) - #160882 (Add basic `splat` support to `rustdoc`) - #160894 (Allow running an arbitrary number of try jobs per PR) - #160790 (rustc-book: update sys-v abi link) - #160878 (Add rust_analyzer to check-cfg names) - #160909 (tests/run-make-cargo/thumb-none-cortex-m: bump `cortex-m` dependency) - #160920 (No longer mention the removed generic) - #160921 (rustdoc: Fix invalid CSS classes generated for notable items) - #160924 (split up `rustc_session`) - #160934 (Ensure TLS accesses don't call the global allocator through panic) - #160937 (Store the names of `Fn` trait parameters in the AST, fix rustfmt bug)
Rollup merge of #160937 - JonathanBrouwer:param_ast, r=ytmimi Store the names of `Fn` trait parameters in the AST, fix rustfmt bug This PR stores the name of a `Fn` trait parameters in the AST. This is needed because * rustfmt needs to rewrite it. * this will also be needed in a follow-up PR to do semantic validation. This PR is split up in commits for reviewability: * `Make inputs to ParenthesizedArgs a ThinVec<Param> in the compiler` changes the AST datatypes, should have no observable effect * `Fix errors in tooling` deals with the consequenses of the first commit in tooling, should have no observable effect * `Improve rewrite_generic_args to take pattern into account` fixes rust-lang/rustfmt#7021 * `Add rustfmt regression test` regression test for rust-lang/rustfmt#7021 I have not worked in the rustfmt codebase before so please review this part carefully. Tracking issue: #158499 cc @ytmimi @JohnTitor
This PR stores the name of a
Fntrait parameters in the AST. This is needed becauseThis PR is split up in commits for reviewability:
Make inputs to ParenthesizedArgs a ThinVec<Param> in the compilerchanges the AST datatypes, should have no observable effectFix errors in toolingdeals with the consequenses of the first commit in tooling, should have no observable effectImprove rewrite_generic_args to take pattern into accountfixes rustfmt emits non-compiling code by removing tokens from function-like macro invocations rustfmt#7021Add rustfmt regression testregression test for rustfmt emits non-compiling code by removing tokens from function-like macro invocations rustfmt#7021I have not worked in the rustfmt codebase before so please review this part carefully.
Tracking issue: #158499
cc @ytmimi @JohnTitor