diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-06-07 16:17:21 +0500 |
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-06-08 11:25:09 +0500 |
| commit | 85ce9ee481a56bcabaa9480cfc0e2b420e4f1807 (patch) | |
| tree | 546842f643a74977c32a405980899c37e7737def | |
| parent | c57119b9a1c86968188bb9703a7859c17f8bc71c (diff) | |
| download | rust-85ce9ee481a56bcabaa9480cfc0e2b420e4f1807.tar.gz rust-85ce9ee481a56bcabaa9480cfc0e2b420e4f1807.zip | |
cleaned up some tests
| -rw-r--r-- | tests/ui/attributes/attr_unknown_custom_attr.rs (renamed from tests/ui/custom_attribute.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/attributes/attr_unknown_custom_attr.stderr (renamed from tests/ui/custom_attribute.stderr) | 6 | ||||
| -rw-r--r-- | tests/ui/attributes/crate-name-mismatch.rs (renamed from tests/ui/crate-name-mismatch.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/attributes/crate-name-mismatch.stderr (renamed from tests/ui/crate-name-mismatch.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/attributes/custom_attr_multisegment_error.rs (renamed from tests/ui/custom-attribute-multisegment.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/attributes/custom_attr_multisegment_error.stderr (renamed from tests/ui/custom-attribute-multisegment.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/default-method-parsing.rs | 7 | ||||
| -rw-r--r-- | tests/ui/runtime/deep_recursion.rs (renamed from tests/ui/deep.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/test-attrs/custom_test_frameworks_simple.rs (renamed from tests/ui/custom-test-frameworks-simple.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/traits/default_method_simple.rs (renamed from tests/ui/default-method-simple.rs) | 10 |
10 files changed, 18 insertions, 19 deletions
diff --git a/tests/ui/custom_attribute.rs b/tests/ui/attributes/attr_unknown_custom_attr.rs index 4957184229d..cdbe48a636f 100644 --- a/tests/ui/custom_attribute.rs +++ b/tests/ui/attributes/attr_unknown_custom_attr.rs @@ -1,3 +1,5 @@ +//! Checks error handling for undefined custom attributes. + #![feature(stmt_expr_attributes)] #[foo] //~ ERROR cannot find attribute `foo` in this scope diff --git a/tests/ui/custom_attribute.stderr b/tests/ui/attributes/attr_unknown_custom_attr.stderr index 4023892d294..76c3b884a5d 100644 --- a/tests/ui/custom_attribute.stderr +++ b/tests/ui/attributes/attr_unknown_custom_attr.stderr @@ -1,17 +1,17 @@ error: cannot find attribute `foo` in this scope - --> $DIR/custom_attribute.rs:3:3 + --> $DIR/attr_unknown_custom_attr.rs:5:3 | LL | #[foo] | ^^^ error: cannot find attribute `foo` in this scope - --> $DIR/custom_attribute.rs:5:7 + --> $DIR/attr_unknown_custom_attr.rs:7:7 | LL | #[foo] | ^^^ error: cannot find attribute `foo` in this scope - --> $DIR/custom_attribute.rs:7:7 + --> $DIR/attr_unknown_custom_attr.rs:9:7 | LL | #[foo] | ^^^ diff --git a/tests/ui/crate-name-mismatch.rs b/tests/ui/attributes/crate-name-mismatch.rs index 7651e0f97eb..0c343d70b9c 100644 --- a/tests/ui/crate-name-mismatch.rs +++ b/tests/ui/attributes/crate-name-mismatch.rs @@ -1,3 +1,5 @@ +//! Checks error handling for mismatched `--crate-name` and `#![crate_name]` values. + //@ compile-flags: --crate-name foo #![crate_name = "bar"] diff --git a/tests/ui/crate-name-mismatch.stderr b/tests/ui/attributes/crate-name-mismatch.stderr index 511562618d5..4021fbe7c18 100644 --- a/tests/ui/crate-name-mismatch.stderr +++ b/tests/ui/attributes/crate-name-mismatch.stderr @@ -1,5 +1,5 @@ error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar` - --> $DIR/crate-name-mismatch.rs:3:1 + --> $DIR/crate-name-mismatch.rs:5:1 | LL | #![crate_name = "bar"] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/custom-attribute-multisegment.rs b/tests/ui/attributes/custom_attr_multisegment_error.rs index 24349213902..1045282c3a3 100644 --- a/tests/ui/custom-attribute-multisegment.rs +++ b/tests/ui/attributes/custom_attr_multisegment_error.rs @@ -1,4 +1,4 @@ -// Unresolved multi-segment attributes are not treated as custom. +//! Unresolved multi-segment attributes are not treated as custom. mod existent {} diff --git a/tests/ui/custom-attribute-multisegment.stderr b/tests/ui/attributes/custom_attr_multisegment_error.stderr index 90ebe277939..02bed225d53 100644 --- a/tests/ui/custom-attribute-multisegment.stderr +++ b/tests/ui/attributes/custom_attr_multisegment_error.stderr @@ -1,5 +1,5 @@ error[E0433]: failed to resolve: could not find `nonexistent` in `existent` - --> $DIR/custom-attribute-multisegment.rs:5:13 + --> $DIR/custom_attr_multisegment_error.rs:5:13 | LL | #[existent::nonexistent] | ^^^^^^^^^^^ could not find `nonexistent` in `existent` diff --git a/tests/ui/default-method-parsing.rs b/tests/ui/default-method-parsing.rs deleted file mode 100644 index 84c3ab747c8..00000000000 --- a/tests/ui/default-method-parsing.rs +++ /dev/null @@ -1,7 +0,0 @@ -//@ check-pass - -trait Foo { - fn m(&self, _:isize) { } -} - -pub fn main() { } diff --git a/tests/ui/deep.rs b/tests/ui/runtime/deep_recursion.rs index 5a631d068b1..bf220f174a1 100644 --- a/tests/ui/deep.rs +++ b/tests/ui/runtime/deep_recursion.rs @@ -1,3 +1,5 @@ +//! Checks deep recursion behavior. + //@ run-pass //@ ignore-emscripten apparently blows the stack diff --git a/tests/ui/custom-test-frameworks-simple.rs b/tests/ui/test-attrs/custom_test_frameworks_simple.rs index 3fb7de6b26b..54a4e4095a7 100644 --- a/tests/ui/custom-test-frameworks-simple.rs +++ b/tests/ui/test-attrs/custom_test_frameworks_simple.rs @@ -1,3 +1,5 @@ +//! Checks run with a custom test framework and indexed test functions. + //@ compile-flags: --test //@ run-pass diff --git a/tests/ui/default-method-simple.rs b/tests/ui/traits/default_method_simple.rs index e5fbedfaece..96fad94f57a 100644 --- a/tests/ui/default-method-simple.rs +++ b/tests/ui/traits/default_method_simple.rs @@ -1,6 +1,6 @@ -//@ run-pass +//! Checks basic default method functionality. -#![allow(dead_code)] +//@ run-pass trait Foo { fn f(&self) { @@ -10,9 +10,7 @@ trait Foo { fn g(&self); } -struct A { - x: isize -} +struct A; impl Foo for A { fn g(&self) { @@ -21,6 +19,6 @@ impl Foo for A { } pub fn main() { - let a = A { x: 1 }; + let a = A; a.f(); } |
