diff --git a/compiler/rustc_trait_selection/src/solve/search_graph.rs b/compiler/rustc_trait_selection/src/solve/search_graph.rs
index c33b302c33a..bede94a2e43 100644
--- a/compiler/rustc_trait_selection/src/solve/search_graph.rs
+++ b/compiler/rustc_trait_selection/src/solve/search_graph.rs
@@ -61,10 +61,11 @@ struct DetachedEntry<'tcx> {
     ///
     /// Given the following rules, when proving `A` the head for
     /// the provisional entry of `C` would be `B`.
-    ///
-    ///     A :- B
-    ///     B :- C
-    ///     C :- A + B + C
+    /// ```plain
+    /// A :- B
+    /// B :- C
+    /// C :- A + B + C
+    /// ```
     head: StackDepth,
     result: QueryResult<'tcx>,
 }