rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: macros: fix indentation in `module!`'s doc comment
@ 2024-08-13 13:09 Yutaro Ohno
  2024-08-13 13:14 ` Miguel Ojeda
  0 siblings, 1 reply; 5+ messages in thread
From: Yutaro Ohno @ 2024-08-13 13:09 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Martin Rodriguez Reboredo, Aswin Unnikrishnan,
	FUJITA Tomonori, Trevor Gross
  Cc: Yutaro Ohno, rust-for-linux

Clippy warns about list content in a doc comment that doesn't have extra
spaces at the beginning of a new line [1], like this:

```rust
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
/// it should be done right now.
```

The suggested format is:

```rust
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
///   it should be done right now.
```

This commit adds extra indentation to the `module!`'s doc comment to
suppress the warning.

Link: https://rust-lang.github.io/rust-clippy/master/index.html#/doc_lazy_continuation [1]
Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
---
 rust/macros/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index 159e75292970..5be0cb9db3ee 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -94,7 +94,7 @@
 ///   - `license`: ASCII string literal of the license of the kernel module (required).
 ///   - `alias`: array of ASCII string literals of the alias names of the kernel module.
 ///   - `firmware`: array of ASCII string literals of the firmware files of
-/// the kernel module.
+///     the kernel module.
 #[proc_macro]
 pub fn module(ts: TokenStream) -> TokenStream {
     module::module(ts)
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-14 10:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13 13:09 [PATCH] rust: macros: fix indentation in `module!`'s doc comment Yutaro Ohno
2024-08-13 13:14 ` Miguel Ojeda
2024-08-13 13:22   ` Yutaro Ohno
2024-08-14  6:08   ` Additional patches for rust-fixes? (was: Re: [PATCH] rust: macros: fix indentation in `module!`'s doc comment) Dirk Behme
2024-08-14 10:46     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).