diff options
Diffstat (limited to 'tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs')
| -rw-r--r-- | tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs | 82 |
1 files changed, 74 insertions, 8 deletions
diff --git a/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs b/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs index c28921b01f1..dd8759b7e37 100644 --- a/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs +++ b/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs @@ -6,14 +6,80 @@ #![feature(no_core)] #![no_core] -/// ```{. class= whatever=hehe #id} } {{ +/// ```{. } /// main; /// ``` -//~^^^ ERROR missing class name after `.` -//~| ERROR missing class name after `class=` -//~| ERROR unsupported attribute `whatever=hehe` -//~| ERROR unsupported attribute `#id` -//~| ERROR unexpected `}` outside attribute block (`{}`) -//~| ERROR unclosed attribute block (`{}`): missing `}` at the end -//~| ERROR unexpected `{` inside attribute block (`{}`) +//~^^^ ERROR unexpected ` ` character after `.` pub fn foo() {} + +/// ```{class= a} +/// main; +/// ``` +//~^^^ ERROR unexpected ` ` character after `=` +pub fn foo2() {} + +/// ```{#id} +/// main; +/// ``` +//~^^^ ERROR unexpected character `#` +pub fn foo3() {} + +/// ```{{ +/// main; +/// ``` +//~^^^ ERROR unexpected character `{` +pub fn foo4() {} + +/// ```} +/// main; +/// ``` +//~^^^ ERROR unexpected character `}` +pub fn foo5() {} + +/// ```) +/// main; +/// ``` +//~^^^ ERROR unexpected character `)` +pub fn foo6() {} + +/// ```{class=} +/// main; +/// ``` +//~^^^ ERROR unexpected `}` character after `=` +pub fn foo7() {} + +/// ```( +/// main; +/// ``` +//~^^^ ERROR unclosed comment: missing `)` at the end +pub fn foo8() {} + +/// ```{class=one=two} +/// main; +/// ``` +//~^^^ ERROR unexpected `=` +pub fn foo9() {} + +/// ```{.one.two} +/// main; +/// ``` +//~^^^ ERROR unexpected `.` character +pub fn foo10() {} + +/// ```{class=.one} +/// main; +/// ``` +//~^^^ ERROR unexpected `.` character after `=` +pub fn foo11() {} + +/// ```{class=one.two} +/// main; +/// ``` +//~^^^ ERROR unexpected `.` character +pub fn foo12() {} + +/// ```{(comment)} +/// main; +/// ``` +//~^^^ ERROR unexpected character `(` +pub fn foo13() {} |
