This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ // This is a regression test for <https://github.com/rust-lang/rust/issues/137970>.
2+ // The output must look nice and not like a `Debug` display of a `String`.
3+
4+ //@ edition: 2024
5+ //@ compile-flags: --test
6+ //@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
7+ //@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
8+ //@ failure-status: 101
9+
10+ //! ```rust
11+ //! assert_eq!(2 + 2, 5);
12+ //! ```
Original file line number Diff line number Diff line change 1+
2+ running 1 test
3+ test tests/rustdoc-ui/edition-2024-doctest-error-output.rs - (line 10) ... FAILED
4+
5+ failures:
6+
7+ ---- tests/rustdoc-ui/edition-2024-doctest-error-output.rs - (line 10) stdout ----
8+
9+ thread 'main' panicked at /tmp/rustdoctestSZq9aS/doctest_bundle_2024.rs:6:1:
10+ assertion `left == right` failed
11+ left: 4
12+ right: 5
13+ stack backtrace:
14+ 0: __rustc::rust_begin_unwind
15+ 1: core::panicking::panic_fmt
16+ 2: core::panicking::assert_failed_inner
17+ 3: core::panicking::assert_failed
18+ 4: doctest_bundle_2024::__doctest_0::main
19+ 5: doctest_bundle_2024::__doctest_0::__main_fn
20+ 6: doctest_runner_2024::__doctest_0::TEST::{{closure}}
21+ 7: core::ops::function::FnOnce::call_once
22+ 8: doctest_runner_2024::main
23+ 9: core::ops::function::FnOnce::call_once
24+ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
25+
26+
27+
28+ failures:
29+ tests/rustdoc-ui/edition-2024-doctest-error-output.rs - (line 10)
30+
31+ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
32+
You can’t perform that action at this time.
0 commit comments