From 88bfcfa43ab67601d38917d9344723e344b257d8 Mon Sep 17 00:00:00 2001 From: Yanteng Si Date: Fri, 26 Apr 2024 14:59:49 +0800 Subject: docs/zh_CN/rust: Update the translation of coding-guidelines to 6.9-rc4 Update to commit bc2e7d5c298a ("rust: support `srctree`-relative links") Signed-off-by: Yanteng Si Reviewed-by: Dongliang Mu Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/e83b5dd929371d42889b19750e5e0385544e170f.1714113680.git.siyanteng@loongson.cn --- Documentation/translations/zh_CN/rust/coding-guidelines.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Documentation/translations') diff --git a/Documentation/translations/zh_CN/rust/coding-guidelines.rst b/Documentation/translations/zh_CN/rust/coding-guidelines.rst index 6c0bdbbc5a2a..419143b938ed 100644 --- a/Documentation/translations/zh_CN/rust/coding-guidelines.rst +++ b/Documentation/translations/zh_CN/rust/coding-guidelines.rst @@ -157,6 +157,18 @@ https://commonmark.org/help/ https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html +此外,内核支持通过在链接目标前添加 ``srctree/`` 来创建相对于源代码树的链接。例如: + +.. code-block:: rust + + //! C header: [`include/linux/printk.h`](srctree/include/linux/printk.h) + +或者: + +.. code-block:: rust + + /// [`struct mutex`]: srctree/include/linux/mutex.h + 命名 ---- -- cgit v1.2.3