Skip to content

Commit

Permalink
rustdoc: escape generics before writing
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Mar 24, 2023
1 parent 3819cf7 commit 236c18f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ fn fmt_type<'cx>(
trace!("fmt_type(t = {:?})", t);

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

0 comments on commit 236c18f

Please sign in to comment.