@@ -670,8 +670,8 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter<'_>, use_absolute: bool) ->
670670 clean:: Never => primitive_link ( f, PrimitiveType :: Never , "!" ) ,
671671 clean:: RawPointer ( m, ref t) => {
672672 let m = match m {
673- clean :: Immutable => "const " ,
674- clean :: Mutable => "mut " ,
673+ hir :: Mutability :: Mut => "mut " ,
674+ hir :: Mutability :: Not => "const " ,
675675 } ;
676676 match * * t {
677677 clean:: Generic ( _) | clean:: ResolvedPath { is_generic : true , ..} => {
@@ -1082,6 +1082,15 @@ impl PrintWithSpace for hir::IsAsync {
10821082 }
10831083}
10841084
1085+ impl PrintWithSpace for hir:: Mutability {
1086+ fn print_with_space ( & self ) -> & str {
1087+ match self {
1088+ hir:: Mutability :: Not => "" ,
1089+ hir:: Mutability :: Mut => "mut " ,
1090+ }
1091+ }
1092+ }
1093+
10851094impl clean:: Import {
10861095 crate fn print ( & self ) -> impl fmt:: Display + ' _ {
10871096 display_fn ( move |f| {
@@ -1151,15 +1160,6 @@ impl clean::TypeBinding {
11511160 }
11521161}
11531162
1154- impl clean:: Mutability {
1155- crate fn print_with_space ( & self ) -> & str {
1156- match self {
1157- clean:: Immutable => "" ,
1158- clean:: Mutable => "mut " ,
1159- }
1160- }
1161- }
1162-
11631163crate fn print_abi_with_space ( abi : Abi ) -> impl fmt:: Display {
11641164 display_fn ( move |f| {
11651165 let quot = if f. alternate ( ) { "\" " } else { """ } ;
0 commit comments