]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc-ui/failed-doctest-output.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / rustdoc-ui / failed-doctest-output.rs
1 // Issue #51162: A failed doctest was not printing its stdout/stderr
2 // FIXME: if/when the output of the test harness can be tested on its own, this test should be
3 // adapted to use that, and that normalize line can go away
4
5 // compile-flags:--test --test-args --test-threads=1
6 // rustc-env:RUST_BACKTRACE=0
7 // normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
8 // failure-status: 101
9
10 // doctest fails at runtime
11 /// ```
12 /// println!("stdout 1");
13 /// eprintln!("stderr 1");
14 /// println!("stdout 2");
15 /// eprintln!("stderr 2");
16 /// panic!("oh no");
17 /// ```
18 pub struct SomeStruct;
19
20 // doctest fails at compile time
21 /// ```
22 /// no
23 /// ```
24 pub struct OtherStruct;