diff --git a/tests/ui/custom_attribute.rs b/tests/ui/attributes/attr_unknown_custom_attr.rs similarity index 81% rename from tests/ui/custom_attribute.rs rename to tests/ui/attributes/attr_unknown_custom_attr.rs index 4957184229da0..cdbe48a636fca 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 similarity index 69% rename from tests/ui/custom_attribute.stderr rename to tests/ui/attributes/attr_unknown_custom_attr.stderr index 4023892d29466..76c3b884a5d4c 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 similarity index 65% rename from tests/ui/crate-name-mismatch.rs rename to tests/ui/attributes/crate-name-mismatch.rs index 7651e0f97ebe3..0c343d70b9cff 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 similarity index 83% rename from tests/ui/crate-name-mismatch.stderr rename to tests/ui/attributes/crate-name-mismatch.stderr index 511562618d569..4021fbe7c181f 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 similarity index 65% rename from tests/ui/custom-attribute-multisegment.rs rename to tests/ui/attributes/custom_attr_multisegment_error.rs index 2434921390245..1045282c3a330 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 similarity index 85% rename from tests/ui/custom-attribute-multisegment.stderr rename to tests/ui/attributes/custom_attr_multisegment_error.stderr index 90ebe27793911..02bed225d53ee 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 84c3ab747c8ee..0000000000000 --- 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 similarity index 85% rename from tests/ui/deep.rs rename to tests/ui/runtime/deep_recursion.rs index 5a631d068b1ae..bf220f174a1b9 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 similarity index 83% rename from tests/ui/custom-test-frameworks-simple.rs rename to tests/ui/test-attrs/custom_test_frameworks_simple.rs index 3fb7de6b26bdc..54a4e4095a77b 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 similarity index 75% rename from tests/ui/default-method-simple.rs rename to tests/ui/traits/default_method_simple.rs index e5fbedfaece1e..96fad94f57ae4 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(); }