diff --git a/tests/ui/README.md b/tests/ui/README.md index 11003bbef992..344b0b2500df 100644 --- a/tests/ui/README.md +++ b/tests/ui/README.md @@ -113,12 +113,6 @@ See [Tracking Issue for autodiff #124509](https://github.com/rust-lang/rust/issu Tests for automatic referencing and dereferencing behavior, such as automatically adding reference operations (`&` or `&mut`) to make a value match a method's receiver type. Sometimes abbreviated as "auto-ref" or "auto-deref". -## `tests/ui/auxiliary/`: Auxiliary files for tests directly under `tests/ui`. - -This top-level `auxiliary` subdirectory contains support files for tests immediately under `tests/ui/`. - -**FIXME(#133895)**: tests immediately under `tests/ui/` should be rehomed to more suitable subdirectories, after which this subdirectory can be removed. - ## `tests/ui/backtrace/`: Backtraces Runtime panics and error handling generate backtraces to assist in debugging and diagnostics. @@ -542,12 +536,6 @@ These tests are about very different topics, only unified by the fact that they Accompanies `tests/ui/error-codes/`, exercises the `--explain` cli flag. -## `tests/ui/explicit/`: Errors involving the concept of "explicit" - -This category contains three tests: two which are about the specific error `explicit use of destructor method`, and one which is about explicit annotation of lifetimes: https://doc.rust-lang.org/stable/rust-by-example/scope/lifetime/explicit.html. - -**FIXME**: Rehome the two tests about the destructor method with `drop`-related categories, and rehome the last test with a category related to lifetimes. - ## `tests/ui/explicit-tail-calls/` Exercises `#![feature(explicit_tail_calls)]` and the `become` keyword. See [Explicit Tail Calls #3407](https://github.com/rust-lang/rfcs/pull/3407). @@ -733,10 +721,6 @@ See [Instrument coverage | The rustc book](https://doc.rust-lang.org/rustc/instr See [Tracking issue for `-Z instrument-xray` #102921](https://github.com/rust-lang/rust/issues/102921). -## `tests/ui/interior-mutability/` - -**FIXME**: contains a single test, probably better rehomed. - ## `tests/ui/internal/` Tests for `internal_unstable` and the attribute header `#![feature(allow_internal_unstable)]`, which lets compiler developers mark features as internal to the compiler, and unstable for standard library use. @@ -759,16 +743,6 @@ Various tests related to rejecting invalid inputs. Tests for checking that invalid usage of compiler flags are rejected. -## `tests/ui/invalid-module-declaration/` - -**FIXME**: Consider merging into module/resolve directories. - -## `tests/ui/invalid-self-argument/`: `self` as a function argument incorrectly - -Tests with erroneous ways of using `self`, such as having it not be the first argument, or using it in a non-associated function (no `impl` or `trait`). - -**FIXME**: Maybe merge with `ui/self`. - ## `tests/ui/io-checks/` Contains a single test. The test tries to output a file into an invalid directory with `-o`, then checks that the result is an error, not an internal compiler error. diff --git a/tests/ui/explicit/explicit-call-to-dtor.fixed b/tests/ui/drop/explicit-call-to-dtor.fixed similarity index 100% rename from tests/ui/explicit/explicit-call-to-dtor.fixed rename to tests/ui/drop/explicit-call-to-dtor.fixed diff --git a/tests/ui/explicit/explicit-call-to-dtor.rs b/tests/ui/drop/explicit-call-to-dtor.rs similarity index 100% rename from tests/ui/explicit/explicit-call-to-dtor.rs rename to tests/ui/drop/explicit-call-to-dtor.rs diff --git a/tests/ui/explicit/explicit-call-to-dtor.stderr b/tests/ui/drop/explicit-call-to-dtor.stderr similarity index 100% rename from tests/ui/explicit/explicit-call-to-dtor.stderr rename to tests/ui/drop/explicit-call-to-dtor.stderr diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/tests/ui/drop/explicit-call-to-supertrait-dtor.fixed similarity index 100% rename from tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed rename to tests/ui/drop/explicit-call-to-supertrait-dtor.fixed diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.rs b/tests/ui/drop/explicit-call-to-supertrait-dtor.rs similarity index 100% rename from tests/ui/explicit/explicit-call-to-supertrait-dtor.rs rename to tests/ui/drop/explicit-call-to-supertrait-dtor.rs diff --git a/tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr b/tests/ui/drop/explicit-call-to-supertrait-dtor.stderr similarity index 100% rename from tests/ui/explicit/explicit-call-to-supertrait-dtor.stderr rename to tests/ui/drop/explicit-call-to-supertrait-dtor.stderr diff --git a/tests/ui/invalid-module-declaration/auxiliary/foo/bar.rs b/tests/ui/invalid-module-declaration/auxiliary/foo/bar.rs deleted file mode 100644 index bcfd7dc0ade7..000000000000 --- a/tests/ui/invalid-module-declaration/auxiliary/foo/bar.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod baz; diff --git a/tests/ui/invalid-module-declaration/auxiliary/foo/mod.rs b/tests/ui/invalid-module-declaration/auxiliary/foo/mod.rs deleted file mode 100644 index 46f285ca47d6..000000000000 --- a/tests/ui/invalid-module-declaration/auxiliary/foo/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod bar; diff --git a/tests/ui/invalid-module-declaration/invalid-module-declaration.rs b/tests/ui/invalid-module-declaration/invalid-module-declaration.rs deleted file mode 100644 index 1c6c282f4b7e..000000000000 --- a/tests/ui/invalid-module-declaration/invalid-module-declaration.rs +++ /dev/null @@ -1,7 +0,0 @@ -mod auxiliary { - mod foo; -} - -fn main() {} - -//~? ERROR file not found for module `baz` diff --git a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr b/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr deleted file mode 100644 index a8f65883d636..000000000000 --- a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0583]: file not found for module `baz` - --> $DIR/auxiliary/foo/bar.rs:1:1 - | -LL | pub mod baz; - | ^^^^^^^^^^^^ - | - = help: to create the module `baz`, create file "$DIR/auxiliary/foo/bar/baz.rs" or "$DIR/auxiliary/foo/bar/baz/mod.rs" - = note: if there is a `mod baz` elsewhere in the crate already, import it with `use crate::...` instead - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0583`. diff --git a/tests/ui/explicit/explicit-self-lifetime-mismatch.rs b/tests/ui/lifetimes/explicit-self-lifetime-mismatch.rs similarity index 100% rename from tests/ui/explicit/explicit-self-lifetime-mismatch.rs rename to tests/ui/lifetimes/explicit-self-lifetime-mismatch.rs diff --git a/tests/ui/explicit/explicit-self-lifetime-mismatch.stderr b/tests/ui/lifetimes/explicit-self-lifetime-mismatch.stderr similarity index 100% rename from tests/ui/explicit/explicit-self-lifetime-mismatch.stderr rename to tests/ui/lifetimes/explicit-self-lifetime-mismatch.stderr diff --git a/tests/ui/invalid-self-argument/bare-fn-start.rs b/tests/ui/self/bare-fn-start.rs similarity index 100% rename from tests/ui/invalid-self-argument/bare-fn-start.rs rename to tests/ui/self/bare-fn-start.rs diff --git a/tests/ui/invalid-self-argument/bare-fn-start.stderr b/tests/ui/self/bare-fn-start.stderr similarity index 100% rename from tests/ui/invalid-self-argument/bare-fn-start.stderr rename to tests/ui/self/bare-fn-start.stderr diff --git a/tests/ui/invalid-self-argument/bare-fn.rs b/tests/ui/self/invalid-self-argument.rs similarity index 100% rename from tests/ui/invalid-self-argument/bare-fn.rs rename to tests/ui/self/invalid-self-argument.rs diff --git a/tests/ui/invalid-self-argument/bare-fn.stderr b/tests/ui/self/invalid-self-argument.stderr similarity index 100% rename from tests/ui/invalid-self-argument/bare-fn.stderr rename to tests/ui/self/invalid-self-argument.stderr diff --git a/tests/ui/invalid-self-argument/trait-fn.rs b/tests/ui/self/trait-fn.rs similarity index 100% rename from tests/ui/invalid-self-argument/trait-fn.rs rename to tests/ui/self/trait-fn.rs diff --git a/tests/ui/invalid-self-argument/trait-fn.stderr b/tests/ui/self/trait-fn.stderr similarity index 100% rename from tests/ui/invalid-self-argument/trait-fn.stderr rename to tests/ui/self/trait-fn.stderr diff --git a/tests/ui/interior-mutability/interior-mutability.rs b/tests/ui/traits/catch-unwind-cell-interior-mut.rs similarity index 100% rename from tests/ui/interior-mutability/interior-mutability.rs rename to tests/ui/traits/catch-unwind-cell-interior-mut.rs diff --git a/tests/ui/interior-mutability/interior-mutability.stderr b/tests/ui/traits/catch-unwind-cell-interior-mut.stderr similarity index 100% rename from tests/ui/interior-mutability/interior-mutability.stderr rename to tests/ui/traits/catch-unwind-cell-interior-mut.stderr