@@ -670,8 +670,8 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter<'_>, use_absolute: bool) ->
670
670
clean:: Never => primitive_link ( f, PrimitiveType :: Never , "!" ) ,
671
671
clean:: RawPointer ( m, ref t) => {
672
672
let m = match m {
673
- clean :: Immutable => "const " ,
674
- clean :: Mutable => "mut " ,
673
+ hir :: Mutability :: Mut => "mut " ,
674
+ hir :: Mutability :: Not => "const " ,
675
675
} ;
676
676
match * * t {
677
677
clean:: Generic ( _) | clean:: ResolvedPath { is_generic : true , ..} => {
@@ -1082,6 +1082,15 @@ impl PrintWithSpace for hir::IsAsync {
1082
1082
}
1083
1083
}
1084
1084
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
+
1085
1094
impl clean:: Import {
1086
1095
crate fn print ( & self ) -> impl fmt:: Display + ' _ {
1087
1096
display_fn ( move |f| {
@@ -1151,15 +1160,6 @@ impl clean::TypeBinding {
1151
1160
}
1152
1161
}
1153
1162
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
-
1163
1163
crate fn print_abi_with_space ( abi : Abi ) -> impl fmt:: Display {
1164
1164
display_fn ( move |f| {
1165
1165
let quot = if f. alternate ( ) { "\" " } else { """ } ;
0 commit comments