You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/3081-multi-part-examples-in-rustdoc/index.md
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,6 @@ A final `split-end` block must be present.
44
44
Between parts, any markdown may appear, including code blocks.
45
45
However, no interleaving or nesting of multi-part examples is allowed.
46
46
47
-
Not only _rust_ examples may be multi-part.
48
-
49
47
Example:
50
48
51
49
//! ```split-start
@@ -66,7 +64,7 @@ Example:
66
64
67
65
Doc-test related tags, such as `ignore` and `no-run` must be specified on the `split-start` block. Such tags specified on `split-continue` or `split-end` blocks will be ignored.
68
66
69
-
Language is not automatically inherited from the one in the `split-start` block. If any part has a language tag that is different than the one in the `split-start`, the documentation will fail to build.
67
+
If a language tag is present, it must be the first word in the info-string and must be present in all parts of the multi-part example.
70
68
71
69
If `split-start` / `split-continue` / `split-end` blocks appear in an erroneous order, the documentation will fail to build.
72
70
@@ -78,7 +76,6 @@ If `split-start` / `split-continue` / `split-end` blocks appear in an erroneous
78
76
> - Its interaction with other features is clear.
79
77
80
78
- Interaction with doc-test related tags seems to be fully explained in the previous section.
81
-
- Interaction with langauge tags seems to be explained, other than the specific error details.
82
79
83
80
> - It is reasonably clear how the feature would be implemented.
84
81
@@ -89,6 +86,7 @@ TODO:
89
86
- Doc-tests details such as line numbers and test names
We would like some more feedback before continuing with greater detail.
94
92
@@ -118,7 +116,7 @@ Both _not permitting_ such nested single-part examples and _additional logic_ fo
118
116
119
117
From the guide section earlier:
120
118
121
-
> Language is not automatically inherited from the one in the `split-start` block. If any part has a language tag that is different than the one in the `split-start`, the documentation will fail to build.
119
+
> If a language tag is present, it must be the first word in the info-string and must be present in all parts of the multi-part example.
122
120
123
121
An alternative to this is that specifying the language in the `split-start` block suffices and rustdoc can understand that all following parts of the multi-part example are of the same language.
0 commit comments