]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: rust: general-information: simplify Kconfig example
authorMiguel Ojeda <ojeda@kernel.org>
Sun, 5 Apr 2026 23:53:05 +0000 (01:53 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 7 Apr 2026 08:00:25 +0000 (10:00 +0200)
There is no need to use `def_bool y if <expr>` -- one can simply write
`def_bool <expr>`.

In fact, the simpler form is how we actually use them in practice in
`init/Kconfig`.

Thus simplify the example.

Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260405235309.418950-30-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Documentation/rust/general-information.rst

index 6146b49b6a9881cf665e2d5279121bd0f1fd6981..91535b2306ed007884aaef5bc0538dadbec8e952 100644 (file)
@@ -158,4 +158,4 @@ numerical comparisons, one may define a new Kconfig symbol:
 .. code-block:: kconfig
 
        config RUSTC_VERSION_MIN_107900
-               def_bool y if RUSTC_VERSION >= 107900
+               def_bool RUSTC_VERSION >= 107900