diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 01915c33a07ad..8fd1c1d1cc652 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -1322,16 +1322,16 @@ impl clean::GenericArg {
}
crate fn display_fn(f: impl FnOnce(&mut fmt::Formatter<'_>) -> fmt::Result) -> impl fmt::Display {
- WithFormatter(Cell::new(Some(f)))
-}
-
-struct WithFormatter(Cell