@@ -37,6 +37,8 @@ pub struct FnStyleSpace(pub ast::FnStyle);
37
37
pub struct Method < ' a > ( pub & ' a clean:: SelfTy , pub & ' a clean:: FnDecl ) ;
38
38
/// Similar to VisSpace, but used for mutability
39
39
pub struct MutableSpace ( pub clean:: Mutability ) ;
40
+ /// Similar to VisSpace, but used for mutability
41
+ pub struct RawMutableSpace ( pub clean:: Mutability ) ;
40
42
/// Wrapper struct for properly emitting the stability level.
41
43
pub struct Stability < ' a > ( pub & ' a Option < clean:: Stability > ) ;
42
44
/// Wrapper struct for emitting the stability level concisely.
@@ -441,7 +443,7 @@ impl fmt::Show for clean::Type {
441
443
clean:: Unique ( ref t) => write ! ( f, "Box<{}>" , * * t) ,
442
444
clean:: Managed ( ref t) => write ! ( f, "Gc<{}>" , * * t) ,
443
445
clean:: RawPointer ( m, ref t) => {
444
- write ! ( f, "*{}{}" , MutableSpace ( m) , * * t)
446
+ write ! ( f, "*{}{}" , RawMutableSpace ( m) , * * t)
445
447
}
446
448
clean:: BorrowedRef { lifetime : ref l, mutability, type_ : ref ty} => {
447
449
let lt = match * l {
@@ -601,6 +603,15 @@ impl fmt::Show for MutableSpace {
601
603
}
602
604
}
603
605
606
+ impl fmt:: Show for RawMutableSpace {
607
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
608
+ match * self {
609
+ RawMutableSpace ( clean:: Immutable ) => write ! ( f, "const " ) ,
610
+ RawMutableSpace ( clean:: Mutable ) => write ! ( f, "mut " ) ,
611
+ }
612
+ }
613
+ }
614
+
604
615
impl < ' a > fmt:: Show for Stability < ' a > {
605
616
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
606
617
let Stability ( stab) = * self ;
0 commit comments