-
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.
- Loading branch information
1 parent
6461cde
commit d5e3294
Showing
3 changed files
with
36 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// check-pass | ||
// compile-flags:--test -Zunstable-options --nocapture | ||
// normalize-stderr-test: "src/test/rustdoc-ui" -> "$$DIR" | ||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR" | ||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME" | ||
|
||
/// ```compile_fail | ||
/// fn foo() { | ||
/// Input: 123 | ||
/// } | ||
/// ``` | ||
pub struct Foo; |
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,18 @@ | ||
error: struct literal body without path | ||
--> $DIR/nocapture-fail.rs:8:10 | ||
| | ||
LL | fn foo() { | ||
| __________^ | ||
LL | | Input: 123 | ||
LL | | } | ||
| |_^ | ||
| | ||
help: you might have forgotten to add the struct literal inside the block | ||
| | ||
LL | fn foo() { SomeStruct { | ||
LL | Input: 123 | ||
LL | } } | ||
| | ||
|
||
error: aborting due to previous error | ||
|
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,6 @@ | ||
|
||
running 1 test | ||
test $DIR/nocapture-fail.rs - Foo (line 7) - compile fail ... ok | ||
|
||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME | ||
|