about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-08-28 15:07:54 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-09-15 21:32:29 +0200
commit7c72edf19fa72a1c9596a79ee9221342a27289ad (patch)
tree9860cc1a66997d73b06f4be4ddfefb399ca5aa1e
parentf038f180fd5c6a70a6018c2609862d5b6912d761 (diff)
downloadrust-7c72edf19fa72a1c9596a79ee9221342a27289ad.tar.gz
rust-7c72edf19fa72a1c9596a79ee9221342a27289ad.zip
Update documentation for `custom_code_classes_in_docs` feature
-rw-r--r--src/doc/rustdoc/src/unstable-features.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index b5d8c819418..0d3f6338af4 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -631,7 +631,7 @@ to jump to a type definition.
 ```rust
 #![feature(custom_code_classes_in_docs)]
 
-/// ```{class=language-c}
+/// ```custom,{class=language-c}
 /// int main(void) { return 0; }
 /// ```
 pub struct Bar;
@@ -641,12 +641,16 @@ The text `int main(void) { return 0; }` is rendered without highlighting in a co
 with the class `language-c`. This can be used to highlight other languages through JavaScript
 libraries for example.
 
+Without the `custom` attribute, it would be generated as a Rust code example with an additional
+`language-C` CSS class. Therefore, if you specifically don't want it to be a Rust code example,
+don't forget to add the `custom` attribute.
+
 To be noted that you can replace `class=` with `.` to achieve the same result:
 
 ```rust
 #![feature(custom_code_classes_in_docs)]
 
-/// ```{.language-c}
+/// ```custom,{.language-c}
 /// int main(void) { return 0; }
 /// ```
 pub struct Bar;