@@ -46,7 +46,6 @@ pub use utils::{get_auto_trait_and_blanket_impls, krate, register_res};
46
46
47
47
pub use self :: types:: * ;
48
48
pub use self :: types:: Type :: * ;
49
- pub use self :: types:: Mutability :: * ;
50
49
pub use self :: types:: ItemEnum :: * ;
51
50
pub use self :: types:: SelfTy :: * ;
52
51
pub use self :: types:: FunctionRetTy :: * ;
@@ -1321,15 +1320,14 @@ impl Clean<Type> for hir::Ty {
1321
1320
1322
1321
match self . kind {
1323
1322
TyKind :: Never => Never ,
1324
- TyKind :: Ptr ( ref m) => RawPointer ( m. mutbl . clean ( cx ) , box m. ty . clean ( cx) ) ,
1323
+ TyKind :: Ptr ( ref m) => RawPointer ( m. mutbl , box m. ty . clean ( cx) ) ,
1325
1324
TyKind :: Rptr ( ref l, ref m) => {
1326
1325
let lifetime = if l. is_elided ( ) {
1327
1326
None
1328
1327
} else {
1329
1328
Some ( l. clean ( cx) )
1330
1329
} ;
1331
- BorrowedRef { lifetime, mutability : m. mutbl . clean ( cx) ,
1332
- type_ : box m. ty . clean ( cx) }
1330
+ BorrowedRef { lifetime, mutability : m. mutbl , type_ : box m. ty . clean ( cx) }
1333
1331
}
1334
1332
TyKind :: Slice ( ref ty) => Slice ( box ty. clean ( cx) ) ,
1335
1333
TyKind :: Array ( ref ty, ref length) => {
@@ -1547,10 +1545,10 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
1547
1545
let n = print_const ( cx, n) ;
1548
1546
Array ( box ty. clean ( cx) , n)
1549
1547
}
1550
- ty:: RawPtr ( mt) => RawPointer ( mt. mutbl . clean ( cx ) , box mt. ty . clean ( cx) ) ,
1548
+ ty:: RawPtr ( mt) => RawPointer ( mt. mutbl , box mt. ty . clean ( cx) ) ,
1551
1549
ty:: Ref ( r, ty, mutbl) => BorrowedRef {
1552
1550
lifetime : r. clean ( cx) ,
1553
- mutability : mutbl. clean ( cx ) ,
1551
+ mutability : mutbl,
1554
1552
type_ : box ty. clean ( cx) ,
1555
1553
} ,
1556
1554
ty:: FnDef ( ..) |
@@ -2073,7 +2071,7 @@ impl Clean<Item> for doctree::Static<'_> {
2073
2071
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2074
2072
inner : StaticItem ( Static {
2075
2073
type_ : self . type_ . clean ( cx) ,
2076
- mutability : self . mutability . clean ( cx ) ,
2074
+ mutability : self . mutability ,
2077
2075
expr : print_const_expr ( cx, self . expr ) ,
2078
2076
} ) ,
2079
2077
}
@@ -2098,15 +2096,6 @@ impl Clean<Item> for doctree::Constant<'_> {
2098
2096
}
2099
2097
}
2100
2098
2101
- impl Clean < Mutability > for hir:: Mutability {
2102
- fn clean ( & self , _: & DocContext < ' _ > ) -> Mutability {
2103
- match self {
2104
- & hir:: Mutability :: Mut => Mutable ,
2105
- & hir:: Mutability :: Not => Immutable ,
2106
- }
2107
- }
2108
- }
2109
-
2110
2099
impl Clean < ImplPolarity > for ty:: ImplPolarity {
2111
2100
fn clean ( & self , _: & DocContext < ' _ > ) -> ImplPolarity {
2112
2101
match self {
@@ -2296,7 +2285,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
2296
2285
hir:: ForeignItemKind :: Static ( ref ty, mutbl) => {
2297
2286
ForeignStaticItem ( Static {
2298
2287
type_ : ty. clean ( cx) ,
2299
- mutability : mutbl. clean ( cx ) ,
2288
+ mutability : * mutbl,
2300
2289
expr : String :: new ( ) ,
2301
2290
} )
2302
2291
}
0 commit comments