about summary refs log tree commit diff
path: root/src/librustdoc/html/markdown.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-09-28 22:37:59 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-09-29 13:01:41 +0200
commit6f5f21adfc88a914c507ba8c9a0f1f34ae292d44 (patch)
tree661442daf985bbe0cade1b34c6d753dddbfb7b64 /src/librustdoc/html/markdown.rs
parent632fed891df4850e579b2c796de7e18b53d80daa (diff)
downloadrust-6f5f21adfc88a914c507ba8c9a0f1f34ae292d44.tar.gz
rust-6f5f21adfc88a914c507ba8c9a0f1f34ae292d44.zip
Rename doctest attribute `standalone-crate` into `standalone_crate` for coherency
Diffstat (limited to 'src/librustdoc/html/markdown.rs')
-rw-r--r--src/librustdoc/html/markdown.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index e1a8dc6e50c..8ae5484feda 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -1264,7 +1264,7 @@ impl LangString {
                         seen_rust_tags = !seen_other_tags || seen_rust_tags;
                         data.no_run = true;
                     }
-                    LangStringToken::LangToken("standalone-crate") => {
+                    LangStringToken::LangToken("standalone_crate") => {
                         data.standalone_crate = true;
                         seen_rust_tags = !seen_other_tags || seen_rust_tags;
                     }
@@ -1315,12 +1315,12 @@ impl LangString {
                                 "use `test_harness` to run functions marked `#[test]` instead of a \
                                 potentially-implicit `main` function",
                             ),
-                            "standalone" | "standalone_crate" => {
+                            "standalone" | "standalone_crate" | "standalone-crate" => {
                                 if let Some(extra) = extra
                                     && extra.sp.at_least_rust_2024()
                                 {
                                     Some(
-                                        "use `standalone-crate` to compile this code block \
+                                        "use `standalone_crate` to compile this code block \
                                         separately",
                                     )
                                 } else {