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

Miguel Ojeda
2024-10-01T17:08:05Z

On Sun, Sep 8, 2024 at 12:22 AM comex <comexk@gmail.com> 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