Update tests for custom classes
This commit is contained in:
parent
6bed1c6061
commit
295ec09b63
4 changed files with 9 additions and 41 deletions
|
@ -57,25 +57,23 @@ pub fn foo8() {}
|
||||||
/// ```{class=one=two}
|
/// ```{class=one=two}
|
||||||
/// main;
|
/// main;
|
||||||
/// ```
|
/// ```
|
||||||
//~^^^ ERROR unexpected `=`
|
//~^^^ ERROR unexpected `=` character
|
||||||
pub fn foo9() {}
|
pub fn foo9() {}
|
||||||
|
|
||||||
/// ```{.one.two}
|
/// ```{.one.two}
|
||||||
/// main;
|
/// main;
|
||||||
/// ```
|
/// ```
|
||||||
//~^^^ ERROR unexpected `.` character
|
|
||||||
pub fn foo10() {}
|
pub fn foo10() {}
|
||||||
|
|
||||||
/// ```{class=.one}
|
/// ```{class=(one}
|
||||||
/// main;
|
/// main;
|
||||||
/// ```
|
/// ```
|
||||||
//~^^^ ERROR unexpected `.` character after `=`
|
//~^^^ ERROR unexpected `(` character after `=`
|
||||||
pub fn foo11() {}
|
pub fn foo11() {}
|
||||||
|
|
||||||
/// ```{class=one.two}
|
/// ```{class=one.two}
|
||||||
/// main;
|
/// main;
|
||||||
/// ```
|
/// ```
|
||||||
//~^^^ ERROR unexpected `.` character
|
|
||||||
pub fn foo12() {}
|
pub fn foo12() {}
|
||||||
|
|
||||||
/// ```{(comment)}
|
/// ```{(comment)}
|
||||||
|
|
|
@ -77,37 +77,21 @@ LL | | /// main;
|
||||||
LL | | /// ```
|
LL | | /// ```
|
||||||
| |_______^
|
| |_______^
|
||||||
|
|
||||||
error: unexpected `.` character
|
error: unexpected `(` character after `=`
|
||||||
--> $DIR/custom_code_classes_in_docs-warning.rs:63:1
|
--> $DIR/custom_code_classes_in_docs-warning.rs:68:1
|
||||||
|
|
|
|
||||||
LL | / /// ```{.one.two}
|
LL | / /// ```{class=(one}
|
||||||
LL | | /// main;
|
|
||||||
LL | | /// ```
|
|
||||||
| |_______^
|
|
||||||
|
|
||||||
error: unexpected `.` character after `=`
|
|
||||||
--> $DIR/custom_code_classes_in_docs-warning.rs:69:1
|
|
||||||
|
|
|
||||||
LL | / /// ```{class=.one}
|
|
||||||
LL | | /// main;
|
|
||||||
LL | | /// ```
|
|
||||||
| |_______^
|
|
||||||
|
|
||||||
error: unexpected `.` character
|
|
||||||
--> $DIR/custom_code_classes_in_docs-warning.rs:75:1
|
|
||||||
|
|
|
||||||
LL | / /// ```{class=one.two}
|
|
||||||
LL | | /// main;
|
LL | | /// main;
|
||||||
LL | | /// ```
|
LL | | /// ```
|
||||||
| |_______^
|
| |_______^
|
||||||
|
|
||||||
error: unexpected character `(`
|
error: unexpected character `(`
|
||||||
--> $DIR/custom_code_classes_in_docs-warning.rs:81:1
|
--> $DIR/custom_code_classes_in_docs-warning.rs:79:1
|
||||||
|
|
|
|
||||||
LL | / /// ```{(comment)}
|
LL | / /// ```{(comment)}
|
||||||
LL | | /// main;
|
LL | | /// main;
|
||||||
LL | | /// ```
|
LL | | /// ```
|
||||||
| |_______^
|
| |_______^
|
||||||
|
|
||||||
error: aborting due to 13 previous errors
|
error: aborting due to 11 previous errors
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,4 @@ pub struct Bar;
|
||||||
/// ```ASN.1
|
/// ```ASN.1
|
||||||
/// int main(void) { return 0; }
|
/// 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;
|
pub struct Bar2;
|
||||||
|
|
|
@ -10,16 +10,5 @@ LL | | /// ```
|
||||||
= help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
|
= help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
|
||||||
= note: found these custom classes: class=language-c
|
= note: found these custom classes: class=language-c
|
||||||
|
|
||||||
warning: custom classes in code blocks will change behaviour
|
warning: 1 warning emitted
|
||||||
--> $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
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue