Handle generics in raw pointers

This commit is contained in:
Manish Goregaokar 2016-01-23 15:01:17 +05:30
parent 9a80bc8530
commit 5a26a52a54

View File

@ -483,9 +483,17 @@ impl fmt::Display for clean::Type {
}
clean::Bottom => f.write_str("!"),
clean::RawPointer(m, ref t) => {
try!(primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
&format!("*{}", RawMutableSpace(m))));
write!(f, "{}", t)
match **t {
clean::Generic(_) | clean::ResolvedPath {is_generic: true, ..} => {
primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
&format!("*{}{}", RawMutableSpace(m), t))
}
_ => {
try!(primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
&format!("*{}", RawMutableSpace(m))));
write!(f, "{}", t)
}
}
}
clean::BorrowedRef{ lifetime: ref l, mutability, type_: ref ty} => {
let lt = match *l {