Re: [PATCH] rust: update dbg macro outputs in docs

From: Miguel Ojeda
Date: Thu Oct 03 2024 - 19:19:06 EST


On Fri, Oct 4, 2024 at 12:17 AM Deepak Thukral <iapain@xxxxxxxxx> wrote:
>
> Hi,
>
> This patch updates outdated examples for `dbg!` macro.

Thanks for the patch!

A few notes on the commit message:

- It should explain what the change is and why it is done --
currently it just says "outdated examples", without mentioning why
they are updated or what the change is.

- Please read the notes in the GitHub issue to know what tags you
should add above the Signed-off-by one.

- Commit messages should not start with "Hi," (you can, however, add
that kind of text/message below the `---` line and it will not go into
the commit) and they should generally be written using the imperative
mood.

- Please take a look at
https://docs.kernel.org/process/submitting-patches.html -- most of
this is described there.

> -/// // ^-- prints: [src/main.rs:2] a * 2 = 4
> +/// // ^-- prints: [src/main.rs:2:9] a * 2 = 4

In terms of the content, this looks OK. However, a couple questions:

- Did you copy the output from the standard library? Did you
double-check if our output looks like that (in terms of the column
number)? Mentioning this in the commit message is a good idea.

- The GitHub issue mentioned the column numbers, so this is good;
however, did you compare this file with the standard library one to
check if other changes/improvements could be imported?

Thanks!

Cheers,
Miguel