On Wed, Mar 18, 2026 at 7:57 PM Miguel Ojeda <[email protected]> wrote: > > On Wed, Mar 18, 2026 at 7:31 PM Joel Fernandes <[email protected]> wrote: > > > > Anyway, the fix is simple, just need to do // SAFETY*: as Miguel suggests > > here, instead of // SAFETY: > > https://lore.kernel.org/all/caniq72kendyupnwmzmhejytjioeijuk_c-yqjk77dpid89l...@mail.gmail.com/ > > So, to clarify, I suggested it as a temporary thing we could do if we > want to use that "fake `unsafe` block in macro matcher" pattern more > and more. > > i.e. if we plan to use the pattern more, then I am happy to ask > upstream if it would make sense for Clippy to recognize it (or perhaps > it is just a false negative instead of a false positive, given > `impl_device_context_deref`), so that we don't need a hacked safety > tag (Cc'ing Alejandra).
The team is a bit hesitant on adding comment-specific syntax apart from the widely used (and already on clippy) `// SAFETY` comments. I'm pushing for some more comments specific to the Rust4Linux project, because we already tailor some lints for specific projects (such as the Safety Critical Rust Consortium), but adding more than new types of comments is a bit much. On this specific lint emission, I'll see if I can get it fixed, because it's a false positive. Cheers, Alejandra.
