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 {