Skip to content

Commit

Permalink
Add new rustdoc-ui test for custom_code_classes_in_docs feature
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 18, 2023
1 parent 7ea307e commit 46e7b41
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
13 changes: 12 additions & 1 deletion tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 46e7b41

Please sign in to comment.