Skip to content

Commit 46e7b41

Browse files
Add new rustdoc-ui test for custom_code_classes_in_docs feature
1 parent 7ea307e commit 46e7b41

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

+8
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

+12-1
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)