@@ -45,7 +45,6 @@ pub use utils::{get_auto_trait_and_blanket_impls, krate, register_res};
4545
4646pub use self :: types:: * ;
4747pub use self :: types:: Type :: * ;
48- pub use self :: types:: Mutability :: * ;
4948pub use self :: types:: ItemEnum :: * ;
5049pub use self :: types:: SelfTy :: * ;
5150pub use self :: types:: FunctionRetTy :: * ;
@@ -1327,15 +1326,14 @@ impl Clean<Type> for hir::Ty {
13271326
13281327 match self . kind {
13291328 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) ) ,
13311330 TyKind :: Rptr ( ref l, ref m) => {
13321331 let lifetime = if l. is_elided ( ) {
13331332 None
13341333 } else {
13351334 Some ( l. clean ( cx) )
13361335 } ;
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) }
13391337 }
13401338 TyKind :: Slice ( ref ty) => Slice ( box ty. clean ( cx) ) ,
13411339 TyKind :: Array ( ref ty, ref length) => {
@@ -1538,10 +1536,10 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
15381536 let n = print_const ( cx, n) ;
15391537 Array ( box ty. clean ( cx) , n)
15401538 }
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) ) ,
15421540 ty:: Ref ( r, ty, mutbl) => BorrowedRef {
15431541 lifetime : r. clean ( cx) ,
1544- mutability : mutbl. clean ( cx ) ,
1542+ mutability : mutbl,
15451543 type_ : box ty. clean ( cx) ,
15461544 } ,
15471545 ty:: FnDef ( ..) |
@@ -2064,7 +2062,7 @@ impl Clean<Item> for doctree::Static<'_> {
20642062 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
20652063 inner : StaticItem ( Static {
20662064 type_ : self . type_ . clean ( cx) ,
2067- mutability : self . mutability . clean ( cx ) ,
2065+ mutability : self . mutability ,
20682066 expr : print_const_expr ( cx, self . expr ) ,
20692067 } ) ,
20702068 }
@@ -2089,15 +2087,6 @@ impl Clean<Item> for doctree::Constant<'_> {
20892087 }
20902088}
20912089
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-
21012090impl Clean < ImplPolarity > for ty:: ImplPolarity {
21022091 fn clean ( & self , _: & DocContext < ' _ > ) -> ImplPolarity {
21032092 match self {
@@ -2287,7 +2276,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
22872276 hir:: ForeignItemKind :: Static ( ref ty, mutbl) => {
22882277 ForeignStaticItem ( Static {
22892278 type_ : ty. clean ( cx) ,
2290- mutability : mutbl. clean ( cx ) ,
2279+ mutability : * mutbl,
22912280 expr : String :: new ( ) ,
22922281 } )
22932282 }
0 commit comments