From 6ea79a13b58d7e62b6aebbbc8ba56042daa3c493 Mon Sep 17 00:00:00 2001 From: Jonathan Brouwer Date: Mon, 23 Jun 2025 20:24:54 +0200 Subject: [PATCH] Fix comment on NoMangle Signed-off-by: Jonathan Brouwer --- src/librustdoc/clean/types.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 0aedc7f5219c8..69899539b4523 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -753,7 +753,8 @@ impl Item { .other_attrs .iter() .filter_map(|attr| { - // NoMangle is special-cased because cargo-semver-checks uses it + // NoMangle is special cased, as it appears in HTML output, and we want to show it in source form, not HIR printing. + // It is also used by cargo-semver-checks. if matches!(attr, hir::Attribute::Parsed(AttributeKind::NoMangle(..))) { Some("#[no_mangle]".to_string()) } else if is_json {