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