diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/ui/test-attrs/custom-test-frameworks | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/test-attrs/custom-test-frameworks')
-rw-r--r-- | tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs | 10 | ||||
-rw-r--r-- | tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr | 15 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs new file mode 100644 index 000000000..2bb133e8b --- /dev/null +++ b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.rs @@ -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() {} +} diff --git a/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr new file mode 100644 index 000000000..bd604afb7 --- /dev/null +++ b/tests/ui/test-attrs/custom-test-frameworks/issue-107454.stderr @@ -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 + |