From d566334a940df8ca66d778c5aa8bebaad9b32d81 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Tue, 19 Jul 2022 20:28:53 +0400 Subject: [PATCH] add backticks --- src/librustdoc/html/render/print_item.rs | 4 ++-- src/test/rustdoc/must_implement_one_of.rs | 2 +- 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 trait_item(w: &mut Buffer, cx: &mut Context<'_>, m: &clean::Item, t: &clean:: if let Some(list) = must_implement_one_of_functions.as_deref() { write!( w, - "
At least one of {} methods is required.
", - list.iter().join(", ") + "
At least one of `{}` methods is required.
", + 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() {} -- 2.44.0