about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-09-19 17:29:39 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-09-19 17:29:39 +0200
commit295ec09b63b1c8352d4a75895eb5d8bd85975b16 (patch)
tree925009083153e3396bd56cf11c50402ccb912c62
parent6bed1c60619b23ccb3011282fa1eed200f71ee0a (diff)
downloadrust-295ec09b63b1c8352d4a75895eb5d8bd85975b16.tar.gz
rust-295ec09b63b1c8352d4a75895eb5d8bd85975b16.zip
Update tests for custom classes
-rw-r--r--tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs8
-rw-r--r--tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr26
-rw-r--r--tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs3
-rw-r--r--tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr13
4 files changed, 9 insertions, 41 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 dd8759b7e37..5398d5833c7 100644
--- a/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs
+++ b/tests/rustdoc-ui/custom_code_classes_in_docs-warning.rs
@@ -57,25 +57,23 @@ pub fn foo8() {}
 /// ```{class=one=two}
 /// main;
 /// ```
-//~^^^ ERROR unexpected `=`
+//~^^^ ERROR unexpected `=` character
 pub fn foo9() {}
 
 /// ```{.one.two}
 /// main;
 /// ```
-//~^^^ ERROR unexpected `.` character
 pub fn foo10() {}
 
-/// ```{class=.one}
+/// ```{class=(one}
 /// main;
 /// ```
-//~^^^ ERROR unexpected `.` character after `=`
+//~^^^ ERROR unexpected `(` character after `=`
 pub fn foo11() {}
 
 /// ```{class=one.two}
 /// main;
 /// ```
-//~^^^ ERROR unexpected `.` character
 pub fn foo12() {}
 
 /// ```{(comment)}
diff --git a/tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr b/tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr
index 3e0dc4b2f7a..14b4b3bab3f 100644
--- a/tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr
+++ b/tests/rustdoc-ui/custom_code_classes_in_docs-warning.stderr
@@ -77,37 +77,21 @@ LL | | /// main;
 LL | | /// ```
    | |_______^
 
-error: unexpected `.` character
-  --> $DIR/custom_code_classes_in_docs-warning.rs:63:1
+error: unexpected `(` character after `=`
+  --> $DIR/custom_code_classes_in_docs-warning.rs:68:1
    |
-LL | / /// ```{.one.two}
-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 | / /// ```{class=(one}
 LL | | /// main;
 LL | | /// ```
    | |_______^
 
 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 | | /// main;
 LL | | /// ```
    | |_______^
 
-error: aborting due to 13 previous errors
+error: aborting due to 11 previous errors
 
diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
index 4fcced86a3b..99263a944f8 100644
--- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
+++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs
@@ -12,7 +12,4 @@ 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;
diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
index c6db54b3128..1a2360d9b30 100644
--- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
+++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr
@@ -10,16 +10,5 @@ LL | | /// ```
    = help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable
    = note: found these custom classes: class=language-c
 
-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
+warning: 1 warning emitted