@@ -45,7 +45,6 @@ pub use utils::{get_auto_trait_and_blanket_impls, krate, register_res};
45
45
46
46
pub use self :: types:: * ;
47
47
pub use self :: types:: Type :: * ;
48
- pub use self :: types:: Mutability :: * ;
49
48
pub use self :: types:: ItemEnum :: * ;
50
49
pub use self :: types:: SelfTy :: * ;
51
50
pub use self :: types:: FunctionRetTy :: * ;
@@ -1327,15 +1326,14 @@ impl Clean<Type> for hir::Ty {
1327
1326
1328
1327
match self . kind {
1329
1328
TyKind :: Never => Never ,
1330
- TyKind :: Ptr ( ref m) => RawPointer ( m. mutbl . clean ( cx ) , box m. ty . clean ( cx) ) ,
1329
+ TyKind :: Ptr ( ref m) => RawPointer ( m. mutbl , box m. ty . clean ( cx) ) ,
1331
1330
TyKind :: Rptr ( ref l, ref m) => {
1332
1331
let lifetime = if l. is_elided ( ) {
1333
1332
None
1334
1333
} else {
1335
1334
Some ( l. clean ( cx) )
1336
1335
} ;
1337
- BorrowedRef { lifetime, mutability : m. mutbl . clean ( cx) ,
1338
- type_ : box m. ty . clean ( cx) }
1336
+ BorrowedRef { lifetime, mutability : m. mutbl , type_ : box m. ty . clean ( cx) }
1339
1337
}
1340
1338
TyKind :: Slice ( ref ty) => Slice ( box ty. clean ( cx) ) ,
1341
1339
TyKind :: Array ( ref ty, ref length) => {
@@ -1538,10 +1536,10 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
1538
1536
let n = print_const ( cx, n) ;
1539
1537
Array ( box ty. clean ( cx) , n)
1540
1538
}
1541
- ty:: RawPtr ( mt) => RawPointer ( mt. mutbl . clean ( cx ) , box mt. ty . clean ( cx) ) ,
1539
+ ty:: RawPtr ( mt) => RawPointer ( mt. mutbl , box mt. ty . clean ( cx) ) ,
1542
1540
ty:: Ref ( r, ty, mutbl) => BorrowedRef {
1543
1541
lifetime : r. clean ( cx) ,
1544
- mutability : mutbl. clean ( cx ) ,
1542
+ mutability : mutbl,
1545
1543
type_ : box ty. clean ( cx) ,
1546
1544
} ,
1547
1545
ty:: FnDef ( ..) |
@@ -2064,7 +2062,7 @@ impl Clean<Item> for doctree::Static<'_> {
2064
2062
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2065
2063
inner : StaticItem ( Static {
2066
2064
type_ : self . type_ . clean ( cx) ,
2067
- mutability : self . mutability . clean ( cx ) ,
2065
+ mutability : self . mutability ,
2068
2066
expr : print_const_expr ( cx, self . expr ) ,
2069
2067
} ) ,
2070
2068
}
@@ -2089,15 +2087,6 @@ impl Clean<Item> for doctree::Constant<'_> {
2089
2087
}
2090
2088
}
2091
2089
2092
- impl Clean < Mutability > for hir:: Mutability {
2093
- fn clean ( & self , _: & DocContext < ' _ > ) -> Mutability {
2094
- match self {
2095
- & hir:: Mutability :: Mut => Mutable ,
2096
- & hir:: Mutability :: Not => Immutable ,
2097
- }
2098
- }
2099
- }
2100
-
2101
2090
impl Clean < ImplPolarity > for ty:: ImplPolarity {
2102
2091
fn clean ( & self , _: & DocContext < ' _ > ) -> ImplPolarity {
2103
2092
match self {
@@ -2287,7 +2276,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
2287
2276
hir:: ForeignItemKind :: Static ( ref ty, mutbl) => {
2288
2277
ForeignStaticItem ( Static {
2289
2278
type_ : ty. clean ( cx) ,
2290
- mutability : mutbl. clean ( cx ) ,
2279
+ mutability : * mutbl,
2291
2280
expr : String :: new ( ) ,
2292
2281
} )
2293
2282
}
0 commit comments