Skip to content

Commit 494fdcd

Browse files
Add new rustdoc-ui test for custom_code_classes_in_docs feature
1 parent 6f47a85 commit 494fdcd

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
//~| NOTE see issue #79483 <https://github.com/rust-lang/rust/issues/79483>
99
//~| HELP add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
1010
pub struct Bar;
11+
12+
/// ```ASN.1
13+
/// int main(void) { return 0; }
14+
/// ```
15+
//~^^^ WARNING custom classes in code blocks will change behaviour
16+
//~| NOTE see issue #79483 <https://github.com/rust-lang/rust/issues/79483>
17+
//~| HELP add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
18+
pub struct Bar2;

tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,16 @@ LL | | /// ```
1010
= help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
1111
= note: found these custom classes: class=language-c
1212

13-
warning: 1 warning emitted
13+
warning: custom classes in code blocks will change behaviour
14+
--> $DIR/feature-gate-custom_code_classes_in_docs.rs:12:1
15+
|
16+
LL | / /// ```ASN.1
17+
LL | | /// int main(void) { return 0; }
18+
LL | | /// ```
19+
| |_______^
20+
|
21+
= note: see issue #79483 <https://github.com/rust-lang/rust/issues/79483> for more information
22+
= help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
23+
24+
warning: 2 warnings emitted
1425

0 commit comments

Comments
 (0)