@@ -1534,42 +1534,6 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ExprCall {
15341534 }
15351535}
15361536
1537- impl FormatRule < ast:: ExprFormattedValue , PyFormatContext < ' _ > >
1538- for crate :: expression:: expr_formatted_value:: FormatExprFormattedValue
1539- {
1540- #[ inline]
1541- fn fmt ( & self , node : & ast:: ExprFormattedValue , f : & mut PyFormatter ) -> FormatResult < ( ) > {
1542- FormatNodeRule :: < ast:: ExprFormattedValue > :: fmt ( self , node, f)
1543- }
1544- }
1545- impl < ' ast > AsFormat < PyFormatContext < ' ast > > for ast:: ExprFormattedValue {
1546- type Format < ' a > = FormatRefWithRule <
1547- ' a ,
1548- ast:: ExprFormattedValue ,
1549- crate :: expression:: expr_formatted_value:: FormatExprFormattedValue ,
1550- PyFormatContext < ' ast > ,
1551- > ;
1552- fn format ( & self ) -> Self :: Format < ' _ > {
1553- FormatRefWithRule :: new (
1554- self ,
1555- crate :: expression:: expr_formatted_value:: FormatExprFormattedValue :: default ( ) ,
1556- )
1557- }
1558- }
1559- impl < ' ast > IntoFormat < PyFormatContext < ' ast > > for ast:: ExprFormattedValue {
1560- type Format = FormatOwnedWithRule <
1561- ast:: ExprFormattedValue ,
1562- crate :: expression:: expr_formatted_value:: FormatExprFormattedValue ,
1563- PyFormatContext < ' ast > ,
1564- > ;
1565- fn into_format ( self ) -> Self :: Format {
1566- FormatOwnedWithRule :: new (
1567- self ,
1568- crate :: expression:: expr_formatted_value:: FormatExprFormattedValue :: default ( ) ,
1569- )
1570- }
1571- }
1572-
15731537impl FormatRule < ast:: ExprFString , PyFormatContext < ' _ > >
15741538 for crate :: expression:: expr_f_string:: FormatExprFString
15751539{
@@ -2148,6 +2112,78 @@ impl<'ast> IntoFormat<PyFormatContext<'ast>> for ast::ExceptHandlerExceptHandler
21482112 }
21492113}
21502114
2115+ impl FormatRule < ast:: FStringExpressionElement , PyFormatContext < ' _ > >
2116+ for crate :: other:: f_string_expression_element:: FormatFStringExpressionElement
2117+ {
2118+ #[ inline]
2119+ fn fmt ( & self , node : & ast:: FStringExpressionElement , f : & mut PyFormatter ) -> FormatResult < ( ) > {
2120+ FormatNodeRule :: < ast:: FStringExpressionElement > :: fmt ( self , node, f)
2121+ }
2122+ }
2123+ impl < ' ast > AsFormat < PyFormatContext < ' ast > > for ast:: FStringExpressionElement {
2124+ type Format < ' a > = FormatRefWithRule <
2125+ ' a ,
2126+ ast:: FStringExpressionElement ,
2127+ crate :: other:: f_string_expression_element:: FormatFStringExpressionElement ,
2128+ PyFormatContext < ' ast > ,
2129+ > ;
2130+ fn format ( & self ) -> Self :: Format < ' _ > {
2131+ FormatRefWithRule :: new (
2132+ self ,
2133+ crate :: other:: f_string_expression_element:: FormatFStringExpressionElement :: default ( ) ,
2134+ )
2135+ }
2136+ }
2137+ impl < ' ast > IntoFormat < PyFormatContext < ' ast > > for ast:: FStringExpressionElement {
2138+ type Format = FormatOwnedWithRule <
2139+ ast:: FStringExpressionElement ,
2140+ crate :: other:: f_string_expression_element:: FormatFStringExpressionElement ,
2141+ PyFormatContext < ' ast > ,
2142+ > ;
2143+ fn into_format ( self ) -> Self :: Format {
2144+ FormatOwnedWithRule :: new (
2145+ self ,
2146+ crate :: other:: f_string_expression_element:: FormatFStringExpressionElement :: default ( ) ,
2147+ )
2148+ }
2149+ }
2150+
2151+ impl FormatRule < ast:: FStringLiteralElement , PyFormatContext < ' _ > >
2152+ for crate :: other:: f_string_literal_element:: FormatFStringLiteralElement
2153+ {
2154+ #[ inline]
2155+ fn fmt ( & self , node : & ast:: FStringLiteralElement , f : & mut PyFormatter ) -> FormatResult < ( ) > {
2156+ FormatNodeRule :: < ast:: FStringLiteralElement > :: fmt ( self , node, f)
2157+ }
2158+ }
2159+ impl < ' ast > AsFormat < PyFormatContext < ' ast > > for ast:: FStringLiteralElement {
2160+ type Format < ' a > = FormatRefWithRule <
2161+ ' a ,
2162+ ast:: FStringLiteralElement ,
2163+ crate :: other:: f_string_literal_element:: FormatFStringLiteralElement ,
2164+ PyFormatContext < ' ast > ,
2165+ > ;
2166+ fn format ( & self ) -> Self :: Format < ' _ > {
2167+ FormatRefWithRule :: new (
2168+ self ,
2169+ crate :: other:: f_string_literal_element:: FormatFStringLiteralElement :: default ( ) ,
2170+ )
2171+ }
2172+ }
2173+ impl < ' ast > IntoFormat < PyFormatContext < ' ast > > for ast:: FStringLiteralElement {
2174+ type Format = FormatOwnedWithRule <
2175+ ast:: FStringLiteralElement ,
2176+ crate :: other:: f_string_literal_element:: FormatFStringLiteralElement ,
2177+ PyFormatContext < ' ast > ,
2178+ > ;
2179+ fn into_format ( self ) -> Self :: Format {
2180+ FormatOwnedWithRule :: new (
2181+ self ,
2182+ crate :: other:: f_string_literal_element:: FormatFStringLiteralElement :: default ( ) ,
2183+ )
2184+ }
2185+ }
2186+
21512187impl FormatRule < ast:: PatternMatchValue , PyFormatContext < ' _ > >
21522188 for crate :: pattern:: pattern_match_value:: FormatPatternMatchValue
21532189{
0 commit comments