about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-07-19 20:28:53 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-07-24 15:10:39 +0400
commitd566334a940df8ca66d778c5aa8bebaad9b32d81 (patch)
treed39ae86aa538c23dfcf432c66fc5e0c52142bab2
parent9b9693c11b808447d683c458315d53e20105b445 (diff)
downloadrust-d566334a940df8ca66d778c5aa8bebaad9b32d81.tar.gz
rust-d566334a940df8ca66d778c5aa8bebaad9b32d81.zip
add backticks
-rw-r--r--src/librustdoc/html/render/print_item.rs4
-rw-r--r--src/test/rustdoc/must_implement_one_of.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 82b06ae02bd..c12b3ca6c60 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -797,8 +797,8 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
         if let Some(list) = must_implement_one_of_functions.as_deref() {
             write!(
                 w,
-                "<div class=\"stab must_implement\">At least one of {} methods is required.</div>",
-                list.iter().join(", ")
+                "<div class=\"stab must_implement\">At least one of `{}` methods is required.</div>",
+                list.iter().join("`, `")
             );
         }
 
diff --git a/src/test/rustdoc/must_implement_one_of.rs b/src/test/rustdoc/must_implement_one_of.rs
index 9a89a5815b4..112c8b25e7e 100644
--- a/src/test/rustdoc/must_implement_one_of.rs
+++ b/src/test/rustdoc/must_implement_one_of.rs
@@ -3,7 +3,7 @@
 
 #[rustc_must_implement_one_of(a, b)]
 // @matches c/trait.Trait.html '//*[@class="stab must_implement"]' \
-//      'At least one of a, b methods is required.$'
+//      'At least one of `a`, `b` methods is required.$'
 pub trait Trait {
     fn a() {}
     fn b() {}