-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix ICE in
custom-test-frameworks
feature
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 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
10 changes: 10 additions & 0 deletions
10
tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs
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,10 @@ | ||
// compile-flags: --test | ||
|
||
#![feature(custom_test_frameworks)] | ||
#![deny(unnameable_test_items)] | ||
|
||
fn foo() { | ||
#[test_case] | ||
//~^ ERROR cannot test inner items [unnameable_test_items] | ||
fn test2() {} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr
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,15 @@ | ||
error: cannot test inner items | ||
--> $DIR/issue-107454.rs:7:5 | ||
| | ||
LL | #[test_case] | ||
| ^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/issue-107454.rs:4:9 | ||
| | ||
LL | #![deny(unnameable_test_items)] | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= note: this error originates in the attribute macro `test_case` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|