From bbaa930b35667947fb6791527cb8e3a273c8b087 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 3 May 2023 14:44:45 +0200 Subject: [PATCH] Fix compilation error "the trait bound `SubdiagnosticMessage: From<&std::string::String>` is not satisfied" --- src/librustdoc/passes/check_custom_code_classes.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/passes/check_custom_code_classes.rs b/src/librustdoc/passes/check_custom_code_classes.rs index 246e7f8f331..eb32e796431 100644 --- a/src/librustdoc/passes/check_custom_code_classes.rs +++ b/src/librustdoc/passes/check_custom_code_classes.rs @@ -67,10 +67,11 @@ pub(crate) fn look_for_custom_classes<'tcx>(cx: &DocContext<'tcx>, item: &Item) .note( // This will list the wrong items to make them more easily searchable. // To ensure the most correct hits, it adds back the 'class:' that was stripped. - &format!( + format!( "found these custom classes: class={}", tests.custom_classes_found.join(",class=") - ), + ) + .as_str(), ) .emit(); }