aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYanteng Si <siyanteng@loongson.cn>2024-04-26 14:59:49 +0800
committerJonathan Corbet <corbet@lwn.net>2024-05-02 10:22:22 -0600
commit88bfcfa43ab67601d38917d9344723e344b257d8 (patch)
tree73ea74de2484d1f47e9a545b18434e3cba83a3dc
parentf7771eba325dd2c75f0f2469342b96002e31710f (diff)
downloadlinux-88bfcfa43ab67601d38917d9344723e344b257d8.tar.gz
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 <siyanteng@loongson.cn> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/e83b5dd929371d42889b19750e5e0385544e170f.1714113680.git.siyanteng@loongson.cn
-rw-r--r--Documentation/translations/zh_CN/rust/coding-guidelines.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/translations/zh_CN/rust/coding-guidelines.rst b/Documentation/translations/zh_CN/rust/coding-guidelines.rst
index 6c0bdbbc5a2a4d..419143b938edbd 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
+
命名
----