-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #52687 - pietroalbini:beta-backports, r=pietroalbini
[beta] Rollup backports Merged and approved: * #52677: Release notes: add some missing 1.28 libs stabilization * #52181: rustdoc: set panic output before starting compiler thread pool r? @ghost
- Loading branch information
Showing
6 changed files
with
155 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// Issue #51162: A failed doctest was not printing its stdout/stderr | ||
// FIXME: if/when the output of the test harness can be tested on its own, this test should be | ||
// adapted to use that, and that normalize line can go away | ||
|
||
// compile-flags:--test | ||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" | ||
// failure-status: 101 | ||
|
||
// doctest fails at runtime | ||
/// ``` | ||
/// panic!("oh no"); | ||
/// ``` | ||
pub struct SomeStruct; | ||
|
||
// doctest fails at compile time | ||
/// ``` | ||
/// no | ||
/// ``` | ||
pub struct OtherStruct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
running 2 tests | ||
test $DIR/failed-doctest-output.rs - OtherStruct (line 26) ... FAILED | ||
test $DIR/failed-doctest-output.rs - SomeStruct (line 20) ... FAILED | ||
|
||
failures: | ||
|
||
---- $DIR/failed-doctest-output.rs - OtherStruct (line 26) stdout ---- | ||
error[E0425]: cannot find value `no` in this scope | ||
--> $DIR/failed-doctest-output.rs:27:1 | ||
| | ||
3 | no | ||
| ^^ not found in this scope | ||
|
||
thread '$DIR/failed-doctest-output.rs - OtherStruct (line 26)' panicked at 'couldn't compile the test', librustdoc/test.rs:330:13 | ||
note: Run with `RUST_BACKTRACE=1` for a backtrace. | ||
|
||
---- $DIR/failed-doctest-output.rs - SomeStruct (line 20) stdout ---- | ||
thread '$DIR/failed-doctest-output.rs - SomeStruct (line 20)' panicked at 'test executable failed: | ||
|
||
thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1 | ||
note: Run with `RUST_BACKTRACE=1` for a backtrace. | ||
|
||
', librustdoc/test.rs:365:17 | ||
|
||
|
||
failures: | ||
$DIR/failed-doctest-output.rs - OtherStruct (line 26) | ||
$DIR/failed-doctest-output.rs - SomeStruct (line 20) | ||
|
||
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters