Skip to content

Commit

Permalink
Handle generics in raw pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jan 23, 2016
1 parent 9a80bc8 commit 5a26a52
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5a26a52

Please sign in to comment.