Update to new emit_error API

This commit is contained in:
Guillaume Gomez
2023-08-28 14:32:01 +02:00
parent 87d2aa5fd3
commit 113220b970
2 changed files with 10 additions and 11 deletions

View File

@@ -54,7 +54,7 @@ pub(crate) fn look_for_custom_classes<'tcx>(cx: &DocContext<'tcx>, item: &Item)
let mut tests = TestsWithCustomClasses { custom_classes_found: vec![] };
let dox = item.attrs.collapsed_doc_value().unwrap_or_default();
let dox = item.attrs.doc_value();
find_codes(&dox, &mut tests, ErrorCodes::No, false, None, true);
if !tests.custom_classes_found.is_empty() && !cx.tcx.features().custom_code_classes_in_docs {
@@ -70,8 +70,7 @@ pub(crate) fn look_for_custom_classes<'tcx>(cx: &DocContext<'tcx>, item: &Item)
format!(
"found these custom classes: class={}",
tests.custom_classes_found.join(",class=")
)
.as_str(),
),
)
.emit();
}