about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-12-20 12:35:57 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-12-20 22:35:00 +0100
commit55653a5178c07a0a854066e79062de4c585561a5 (patch)
treeff22bb0fb27b64114e0770983c19e79794cc526a
parentcbb3df41fb48d0a5ebcdd0f4b44cc3ad6a5a837a (diff)
downloadrust-55653a5178c07a0a854066e79062de4c585561a5.tar.gz
rust-55653a5178c07a0a854066e79062de4c585561a5.zip
Add explanations on how arguments are split
-rw-r--r--src/doc/rustdoc/src/unstable-features.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index f1aa8a53422..667f07cf956 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -722,3 +722,22 @@ test tests/rustdoc-ui/doctest/rustflags.rs - Bar (line 5) ... ok
 
 test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
 ```
+
+The parsing of arguments works as follows: if it encounters a `"` or a `'`, it will continue
+until it finds the character unescaped (without a prepending `\`). If not inside a string, a
+whitespace character will also split arguments. Example:
+
+```text
+"hello 'a'\" ok" how are   'you today?'
+```
+
+will be split as follows:
+
+```text
+[
+    "hello 'a'\" ok",
+    "how",
+    "are",
+    "you today?",
+]
+```