about summary refs log tree commit diff
path: root/tests/coverage/branch/generics.rs
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-04-20 21:45:38 +0100
committerGitHub <noreply@github.com>2024-04-20 21:45:38 +0100
commitb3f9117a2d4e316b0f44a1d0b0e4bc38ed8b01c3 (patch)
tree35795d19faf12f0c5d4537095647f6d6fc49ae73 /tests/coverage/branch/generics.rs
parent726361caf463d1419e99b34d82df5d1656a583e4 (diff)
parentdebdb72ba8354db14a22103f43e9995ea8e2beb9 (diff)
downloadrust-b3f9117a2d4e316b0f44a1d0b0e4bc38ed8b01c3.tar.gz
rust-b3f9117a2d4e316b0f44a1d0b0e4bc38ed8b01c3.zip
Rollup merge of #124191 - dtolnay:fixup, r=compiler-errors
Give a name to each distinct manipulation of pretty-printer FixupContext

There are only 7 distinct ways that the AST pretty-printer interacts with FixupContext: 3 constructors (including Default), 2 transformations, and 2 queries.

This PR turns these into associated functions which can be documented with examples.

This PR unblocks https://github.com/rust-lang/rust/pull/119427#discussion_r1439481201. In order to improve the pretty-printer's behavior regarding parenthesization of braced macro calls in match arms, which have different grammar than macro calls in statements, FixupContext needs to be extended with 2 new fields. In the previous approach, that would be onerous. In the new approach, all it entails is 1 new constructor (`FixupContext::new_match_arm()`).
Diffstat (limited to 'tests/coverage/branch/generics.rs')
0 files changed, 0 insertions, 0 deletions