about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-09-18 22:11:03 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-09-19 13:19:15 +0200
commit494fdcd8ecf0fea910fdc17c84dbd925e80e2b75 (patch)
treea0d531df878a597501c12511d0dbaa1ca92cfafe /tests
parent6f47a858f27a9e9546eaf9368b2a4fba3a4d74b8 (diff)
downloadrust-494fdcd8ecf0fea910fdc17c84dbd925e80e2b75.tar.gz
rust-494fdcd8ecf0fea910fdc17c84dbd925e80e2b75.zip
Add new rustdoc-ui test for `custom_code_classes_in_docs` feature
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs8
-rw-r--r--tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr13
2 files changed, 20 insertions, 1 deletions
diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
index 3f0f8b5b9f9..4fcced86a3b 100644
--- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
+++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
@@ -8,3 +8,11 @@
 //~| NOTE see issue #79483 <https://github.com/rust-lang/rust/issues/79483>
 //~| HELP add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
 pub struct Bar;
+
+/// ```ASN.1
+/// int main(void) { return 0; }
+/// ```
+//~^^^ WARNING custom classes in code blocks will change behaviour
+//~| NOTE see issue #79483 <https://github.com/rust-lang/rust/issues/79483>
+//~| HELP add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
+pub struct Bar2;
diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
index 1a2360d9b30..c6db54b3128 100644
--- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
+++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
@@ -10,5 +10,16 @@ LL | | /// ```
    = help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
    = note: found these custom classes: class=language-c
 
-warning: 1 warning emitted
+warning: custom classes in code blocks will change behaviour
+  --> $DIR/feature-gate-custom_code_classes_in_docs.rs:12:1
+   |
+LL | / /// ```ASN.1
+LL | | /// int main(void) { return 0; }
+LL | | /// ```
+   | |_______^
+   |
+   = note: see issue #79483 <https://github.com/rust-lang/rust/issues/79483> for more information
+   = help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
+
+warning: 2 warnings emitted