Re: [PATCH] rust: Use consistent "# Examples" heading style in rustdoc

From: Miguel Ojeda
Date: Tue Jun 10 2025 - 04:35:21 EST


On Tue, Jun 10, 2025 at 6:38 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> Some modules previously used `## Examples` or `# Example`, which deviates
> from the preferred `# Examples` style.

Note that `##` is not necessarily wrong, it depends on the intended
header level. Top-level headers use `#`, second level is `##`, and so
on.

(In particular, it shouldn't be used as a hack to get smaller font
size in the rendered form).

So, for instance, in the `workqueue.rs` one in this patch, the example
is likely intended to be a subsection of the "safe API" section, not
an example of everything, so I don't think that one should change.

Thanks!

Cheers,
Miguel