@@ -46,7 +46,6 @@ pub use utils::{get_auto_trait_and_blanket_impls, krate, register_res};
4646
4747pub use self :: types:: * ;
4848pub use self :: types:: Type :: * ;
49- pub use self :: types:: Mutability :: * ;
5049pub use self :: types:: ItemEnum :: * ;
5150pub use self :: types:: SelfTy :: * ;
5251pub use self :: types:: FunctionRetTy :: * ;
@@ -1321,15 +1320,14 @@ impl Clean<Type> for hir::Ty {
13211320
13221321 match self . kind {
13231322 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) ) ,
13251324 TyKind :: Rptr ( ref l, ref m) => {
13261325 let lifetime = if l. is_elided ( ) {
13271326 None
13281327 } else {
13291328 Some ( l. clean ( cx) )
13301329 } ;
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) }
13331331 }
13341332 TyKind :: Slice ( ref ty) => Slice ( box ty. clean ( cx) ) ,
13351333 TyKind :: Array ( ref ty, ref length) => {
@@ -1547,10 +1545,10 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
15471545 let n = print_const ( cx, n) ;
15481546 Array ( box ty. clean ( cx) , n)
15491547 }
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) ) ,
15511549 ty:: Ref ( r, ty, mutbl) => BorrowedRef {
15521550 lifetime : r. clean ( cx) ,
1553- mutability : mutbl. clean ( cx ) ,
1551+ mutability : mutbl,
15541552 type_ : box ty. clean ( cx) ,
15551553 } ,
15561554 ty:: FnDef ( ..) |
@@ -2073,7 +2071,7 @@ impl Clean<Item> for doctree::Static<'_> {
20732071 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
20742072 inner : StaticItem ( Static {
20752073 type_ : self . type_ . clean ( cx) ,
2076- mutability : self . mutability . clean ( cx ) ,
2074+ mutability : self . mutability ,
20772075 expr : print_const_expr ( cx, self . expr ) ,
20782076 } ) ,
20792077 }
@@ -2098,15 +2096,6 @@ impl Clean<Item> for doctree::Constant<'_> {
20982096 }
20992097}
21002098
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-
21102099impl Clean < ImplPolarity > for ty:: ImplPolarity {
21112100 fn clean ( & self , _: & DocContext < ' _ > ) -> ImplPolarity {
21122101 match self {
@@ -2296,7 +2285,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
22962285 hir:: ForeignItemKind :: Static ( ref ty, mutbl) => {
22972286 ForeignStaticItem ( Static {
22982287 type_ : ty. clean ( cx) ,
2299- mutability : mutbl. clean ( cx ) ,
2288+ mutability : * mutbl,
23002289 expr : String :: new ( ) ,
23012290 } )
23022291 }
0 commit comments