Skip to content

Commit 5a26a52

Browse files
committed
Handle generics in raw pointers
1 parent 9a80bc8 commit 5a26a52

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/librustdoc/html/format.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,17 @@ impl fmt::Display for clean::Type {
483483
}
484484
clean::Bottom => f.write_str("!"),
485485
clean::RawPointer(m, ref t) => {
486-
try!(primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
487-
&format!("*{}", RawMutableSpace(m))));
488-
write!(f, "{}", t)
486+
match **t {
487+
clean::Generic(_) | clean::ResolvedPath {is_generic: true, ..} => {
488+
primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
489+
&format!("*{}{}", RawMutableSpace(m), t))
490+
}
491+
_ => {
492+
try!(primitive_link(f, clean::PrimitiveType::PrimitiveRawPointer,
493+
&format!("*{}", RawMutableSpace(m))));
494+
write!(f, "{}", t)
495+
}
496+
}
489497
}
490498
clean::BorrowedRef{ lifetime: ref l, mutability, type_: ref ty} => {
491499
let lt = match *l {

0 commit comments

Comments
 (0)