Re: [PATCH v6 3/9] rust: sync: atomic: Add ordering annotation types
Miguel Ojeda <[email protected]> Thu, 10 Jul 2025 20:32:40 +0200
| Newsgroups | dev.linux.lists.lkmm,org.kernel.vger.linux-arch,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <CANiq72=Oq-JHkBuTAZPVYO5omuXswgGfLXu+nAGwEdRdgkU-0w@mail.gmail.com> |
On Thu, Jul 10, 2025 at 5:05 PM Benno Lossin <[email protected]> wrote: > > I don't think we have a lint for that, so I'd prefer if we avoid that... > > Someone is going to just `use ...::ordering::Any` and then have a > function `fn<T: Any>(_: T)` in their code and that will be very > confusing. I guess there could be a lint that detects a given item being `use`d which we could use in some cases like this. I took a quick look, and I see `enum_glob_use`, but that seems global without a way to filter, and it doesn't cover direct `use`s. Then there is `wildcard_imports`, and that seems fairly usable (it has an allowed list), but of course doesn't cover non-wildcard ones. Cheers, Miguel