Re: [PATCH 16/19] Documentation: rust: add coding guidelines on lints

From: Miguel Ojeda
Date: Tue Oct 01 2024 - 13:08:15 EST


On Sun, Sep 8, 2024 at 12:22 AM comex <comexk@xxxxxxxxx> wrote:
>
> You can always hide the pragmas behind a macro:
>
> https://gcc.godbolt.org/z/WTEaYWW8c
>
> It’s not perfect, because warning names sometimes differ between GCC and Clang, among other reasons.

That could be an interesting option for some projects, but yeah, as
you say, I think it is far from ideal. It breaks `clang-format`,
wrapping functions/structs/... would look weird, and generally the
syntax gets on the way of the "normal" code (so even for statements
one would probably want to keep the start and end on their own lines).

Cheers,
Miguel