Skip to content

Commit 236c18f

Browse files
committed
rustdoc: escape generics before writing
1 parent 3819cf7 commit 236c18f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ fn fmt_type<'cx>(
853853
trace!("fmt_type(t = {:?})", t);
854854

855855
match *t {
856-
clean::Generic(name) => write!(f, "{}", name),
856+
clean::Generic(name) => write!(f, "{}", Escape(name.as_str())),
857857
clean::Type::Path { ref path } => {
858858
// Paths like `T::Output` and `Self::Output` should be rendered with all segments.
859859
let did = path.def_id();

0 commit comments

Comments
 (0)