File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -961,6 +961,7 @@ fn format_impl_ref_and_type(
961961 of_trait,
962962 self_ty,
963963 items : _,
964+ constness,
964965 } = iimpl;
965966 let mut result = String :: with_capacity ( 128 ) ;
966967
@@ -969,6 +970,8 @@ fn format_impl_ref_and_type(
969970 if let Some ( of_trait) = of_trait. as_deref ( ) {
970971 result. push_str ( format_defaultness ( of_trait. defaultness ) ) ;
971972 result. push_str ( format_safety ( of_trait. safety ) ) ;
973+ } else {
974+ result. push_str ( format_constness_right ( * constness) ) ;
972975 }
973976
974977 let shape = if context. config . style_edition ( ) >= StyleEdition :: Edition2024 {
@@ -985,7 +988,7 @@ fn format_impl_ref_and_type(
985988
986989 let trait_ref_overhead;
987990 if let Some ( of_trait) = of_trait. as_deref ( ) {
988- result. push_str ( format_constness_right ( of_trait . constness ) ) ;
991+ result. push_str ( format_constness_right ( * constness) ) ;
989992 let polarity_str = match of_trait. polarity {
990993 ast:: ImplPolarity :: Negative ( _) => "!" ,
991994 ast:: ImplPolarity :: Positive => "" ,
You can’t perform that action at this time.
0 commit comments