xref: /linux/.clippy.toml (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
17d56786eSMiguel Ojeda# SPDX-License-Identifier: GPL-2.0
28577c9dcSMiguel Ojeda
3*b6cfba43SMiguel Ojedamsrv = "1.85.0"
4f0915acdSMiguel Ojeda
5624063b9SMiguel Ojedacheck-private-items = true
6624063b9SMiguel Ojeda
78577c9dcSMiguel Ojedadisallowed-macros = [
88577c9dcSMiguel Ojeda    # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate
98577c9dcSMiguel Ojeda    # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303.
10c016722fSMiguel Ojeda    { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true },
118577c9dcSMiguel Ojeda]
12b3d161f2SGary Guo
13b3d161f2SGary Guo[[disallowed-methods]]
14b3d161f2SGary Guopath = "core::ffi::CStr::as_ptr"
15b3d161f2SGary Guoreplacement = "kernel::prelude::CStrExt::as_char_ptr"
16b3d161f2SGary Guoreason = "kernel's `char` is always unsigned, use `as_char_ptr` instead"
17b3d161f2SGary Guo
18b3d161f2SGary Guo[[disallowed-methods]]
19b3d161f2SGary Guopath = "core::ffi::CStr::from_ptr"
20b3d161f2SGary Guoreplacement = "kernel::prelude::CStrExt::from_char_ptr"
21b3d161f2SGary Guoreason = "kernel's `char` is always unsigned, use `from_char_ptr` instead"
22