File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ //@ check-pass
2
+ //@ compile-flags: --test --test-args=--test-threads=1 -Zunstable-options --edition 2024
3
+ //@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
4
+ //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
5
+ //@ normalize-stdout-test ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
6
+
7
+ /// This doctest is used to ensure that if a crate attribute is present,
8
+ /// it will not be part of the merged doctests.
9
+ ///
10
+ /// ```
11
+ /// #![doc(html_playground_url = "foo")]
12
+ ///
13
+ /// pub struct Bar;
14
+ /// ```
15
+ ///
16
+ /// This one will allow us to confirm that the doctest above will be a
17
+ /// standalone one (there will be two separate doctests passes).
18
+ ///
19
+ /// ```
20
+ /// let x = 12;
21
+ /// ```
22
+ pub struct Foo ;
Original file line number Diff line number Diff line change
1
+
2
+ running 1 test
3
+ test $DIR/2024-doctests-crate-attribute.rs - Foo (line 19) ... ok
4
+
5
+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
6
+
7
+
8
+ running 1 test
9
+ test $DIR/2024-doctests-crate-attribute.rs - Foo (line 10) ... ok
10
+
11
+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
12
+
You can’t perform that action at this time.
0 commit comments