Skip to content

Commit 86c5d1c

Browse files
committed
docs: rust: general-information: use real example
Currently the example in the documentation shows a version-based name for the Kconfig example: RUSTC_VERSION_MIN_107900 The reason behind it was to possibly avoid repetition in case several features used the same minimum. However, we ended up preferring to give them a descriptive name for each feature added even if that could lead to some repetition. In practice, the repetition has not happened so far, and even if it does at some point, it is not a big deal. Thus replace the example in the documentation with one of our current examples (after removing previous ones from the bump), to show how they actually look like, and in case someone `grep`s for it. In addition, it has the advantage that it shows the `RUSTC_HAS_*` pattern we follow in `init/Kconfig`, similar to the C side. Reviewed-by: Tamir Duberstein <tamird@kernel.org> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260405235309.418950-31-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 9375ea7 commit 86c5d1c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Documentation/rust/general-information.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,5 @@ numerical comparisons, one may define a new Kconfig symbol:
157157

158158
.. code-block:: kconfig
159159
160-
config RUSTC_VERSION_MIN_107900
161-
def_bool RUSTC_VERSION >= 107900
160+
config RUSTC_HAS_SPAN_FILE
161+
def_bool RUSTC_VERSION >= 108800

0 commit comments

Comments
 (0)