File tree 3 files changed +24
-2
lines changed
3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
2
- running 1 test
2
+ running 2 tests
3
+ test $DIR/cfg-test.rs - Bar (line 28) ... ok
3
4
test $DIR/cfg-test.rs - Foo (line 20) ... ok
4
5
5
- test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
6
+ test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
6
7
Original file line number Diff line number Diff line change
1
+ // build-pass
2
+ // compile-flags:--test
3
+ // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
4
+
5
+ #![ feature( cfg_doctest) ]
6
+
7
+ // Make sure `cfg(doctest)` is set when finding doctests but not inside
8
+ // the doctests.
9
+
10
+ /// ```
11
+ /// #![feature(cfg_doctest)]
12
+ /// assert!(!cfg!(doctest));
13
+ /// ```
14
+ #[ cfg( doctest) ]
15
+ pub struct Foo ;
Original file line number Diff line number Diff line change
1
+
2
+ running 1 test
3
+ test $DIR/doc-test-doctest-feature.rs - Foo (line 10) ... ok
4
+
5
+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
6
+
You can’t perform that action at this time.
0 commit comments