]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/format.rs
Rollup merge of #104110 - krasimirgg:msan-16, r=nagisa
[rust.git] / src / librustdoc / html / format.rs
index 06db3fb0ec4000794de001220a0feceffb0b390b..39e2a90222670250fd8c0c81e75fe50901430435 100644 (file)
@@ -107,10 +107,6 @@ pub(crate) fn into_inner(self) -> String {
         self.buffer
     }
 
-    pub(crate) fn insert_str(&mut self, idx: usize, s: &str) {
-        self.buffer.insert_str(idx, s);
-    }
-
     pub(crate) fn push_str(&mut self, s: &str) {
         self.buffer.push_str(s);
     }
@@ -1232,9 +1228,8 @@ pub(crate) fn print<'a, 'tcx: 'a>(
     ) -> impl fmt::Display + 'a + Captures<'tcx> {
         display_fn(move |f| {
             for (i, input) in self.values.iter().enumerate() {
-                if !input.name.is_empty() {
-                    write!(f, "{}: ", input.name)?;
-                }
+                write!(f, "{}: ", input.name)?;
+
                 if f.alternate() {
                     write!(f, "{:#}", input.type_.print(cx))?;
                 } else {
@@ -1367,10 +1362,8 @@ fn inner_full_print(
                     args.push_str("const ");
                     args_plain.push_str("const ");
                 }
-                if !input.name.is_empty() {
-                    write!(args, "{}: ", input.name);
-                    write!(args_plain, "{}: ", input.name);
-                }
+                write!(args, "{}: ", input.name);
+                write!(args_plain, "{}: ", input.name);
 
                 if f.alternate() {
                     write!(args, "{:#}", input.type_.print(cx));