Skip to content

Commit 295ec09

Browse files
Update tests for custom classes
1 parent 6bed1c6 commit 295ec09

4 files changed

+9
-41
lines changed

tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,23 @@ pub fn foo8() {}
5757
/// ```{class=one=two}
5858
/// main;
5959
/// ```
60-
//~^^^ ERROR unexpected `=`
60+
//~^^^ ERROR unexpected `=` character
6161
pub fn foo9() {}
6262

6363
/// ```{.one.two}
6464
/// main;
6565
/// ```
66-
//~^^^ ERROR unexpected `.` character
6766
pub fn foo10() {}
6867

69-
/// ```{class=.one}
68+
/// ```{class=(one}
7069
/// main;
7170
/// ```
72-
//~^^^ ERROR unexpected `.` character after `=`
71+
//~^^^ ERROR unexpected `(` character after `=`
7372
pub fn foo11() {}
7473

7574
/// ```{class=one.two}
7675
/// main;
7776
/// ```
78-
//~^^^ ERROR unexpected `.` character
7977
pub fn foo12() {}
8078

8179
/// ```{(comment)}

tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr

+5-21
Original file line numberDiff line numberDiff line change
@@ -77,37 +77,21 @@ LL | | /// main;
7777
LL | | /// ```
7878
| |_______^
7979

80-
error: unexpected `.` character
81-
--> $DIR/custom_code_classes_in_docs-warning.rs:63:1
80+
error: unexpected `(` character after `=`
81+
--> $DIR/custom_code_classes_in_docs-warning.rs:68:1
8282
|
83-
LL | / /// ```{.one.two}
84-
LL | | /// main;
85-
LL | | /// ```
86-
| |_______^
87-
88-
error: unexpected `.` character after `=`
89-
--> $DIR/custom_code_classes_in_docs-warning.rs:69:1
90-
|
91-
LL | / /// ```{class=.one}
92-
LL | | /// main;
93-
LL | | /// ```
94-
| |_______^
95-
96-
error: unexpected `.` character
97-
--> $DIR/custom_code_classes_in_docs-warning.rs:75:1
98-
|
99-
LL | / /// ```{class=one.two}
83+
LL | / /// ```{class=(one}
10084
LL | | /// main;
10185
LL | | /// ```
10286
| |_______^
10387

10488
error: unexpected character `(`
105-
--> $DIR/custom_code_classes_in_docs-warning.rs:81:1
89+
--> $DIR/custom_code_classes_in_docs-warning.rs:79:1
10690
|
10791
LL | / /// ```{(comment)}
10892
LL | | /// main;
10993
LL | | /// ```
11094
| |_______^
11195

112-
error: aborting due to 13 previous errors
96+
error: aborting due to 11 previous errors
11397

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

-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,4 @@ pub struct Bar;
1212
/// ```ASN.1
1313
/// int main(void) { return 0; }
1414
/// ```
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
1815
pub struct Bar2;

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

+1-12
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,5 @@ 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: 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
13+
warning: 1 warning emitted
2514

0 commit comments

Comments
 (0)