Skip to content

Commit 9428dff

Browse files
authored
Unrolled build for #149473
Rollup merge of #149473 - reddevilmidzy:t7, r=Kivooeo Tidying up UI tests [7/N] > [!NOTE] > Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge. part of #133895 removed directory `tests/ui/explicit`, `tests/ui/interior-mutability`, `tests/ui/invalid-module-declaration`, tests/ui/invalid-self-argument` r? Kivooeo
2 parents a463b0e + a4a7950 commit 9428dff

27 files changed

+175
-229
lines changed

tests/ui/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ See [Tracking Issue for autodiff #124509](https://github.com/rust-lang/rust/issu
113113

114114
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".
115115

116-
## `tests/ui/auxiliary/`: Auxiliary files for tests directly under `tests/ui`.
117-
118-
This top-level `auxiliary` subdirectory contains support files for tests immediately under `tests/ui/`.
119-
120-
**FIXME(#133895)**: tests immediately under `tests/ui/` should be rehomed to more suitable subdirectories, after which this subdirectory can be removed.
121-
122116
## `tests/ui/backtrace/`: Backtraces
123117

124118
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
542536

543537
Accompanies `tests/ui/error-codes/`, exercises the `--explain` cli flag.
544538

545-
## `tests/ui/explicit/`: Errors involving the concept of "explicit"
546-
547-
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.
548-
549-
**FIXME**: Rehome the two tests about the destructor method with `drop`-related categories, and rehome the last test with a category related to lifetimes.
550-
551539
## `tests/ui/explicit-tail-calls/`
552540

553541
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
733721

734722
See [Tracking issue for `-Z instrument-xray` #102921](https://github.com/rust-lang/rust/issues/102921).
735723

736-
## `tests/ui/interior-mutability/`
737-
738-
**FIXME**: contains a single test, probably better rehomed.
739-
740724
## `tests/ui/internal/`
741725

742726
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.
759743

760744
Tests for checking that invalid usage of compiler flags are rejected.
761745

762-
## `tests/ui/invalid-module-declaration/`
763-
764-
**FIXME**: Consider merging into module/resolve directories.
765-
766-
## `tests/ui/invalid-self-argument/`: `self` as a function argument incorrectly
767-
768-
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`).
769-
770-
**FIXME**: Maybe merge with `ui/self`.
771-
772746
## `tests/ui/io-checks/`
773747

774748
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.

tests/ui/explicit/explicit-call-to-dtor.fixed renamed to tests/ui/drop/explicit-call-to-dtor.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-rustfix
22
struct Foo {
3-
x: isize
3+
x: isize,
44
}
55

66
impl Drop for Foo {
@@ -12,5 +12,5 @@ impl Drop for Foo {
1212
fn main() {
1313
let x = Foo { x: 3 };
1414
println!("{}", x.x);
15-
drop(x); //~ ERROR explicit use of destructor method
15+
drop(x); //~ ERROR explicit use of destructor method
1616
}

tests/ui/explicit/explicit-call-to-dtor.rs renamed to tests/ui/drop/explicit-call-to-dtor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-rustfix
22
struct Foo {
3-
x: isize
3+
x: isize,
44
}
55

66
impl Drop for Foo {
@@ -12,5 +12,5 @@ impl Drop for Foo {
1212
fn main() {
1313
let x = Foo { x: 3 };
1414
println!("{}", x.x);
15-
x.drop(); //~ ERROR explicit use of destructor method
15+
x.drop(); //~ ERROR explicit use of destructor method
1616
}

tests/ui/explicit/explicit-call-to-supertrait-dtor.fixed renamed to tests/ui/drop/explicit-call-to-supertrait-dtor.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![allow(dropping_references)]
55

66
struct Foo {
7-
x: isize
7+
x: isize,
88
}
99

1010
#[allow(drop_bounds)]
@@ -20,7 +20,7 @@ impl Drop for Foo {
2020

2121
impl Bar for Foo {
2222
fn blah(&self) {
23-
drop(self); //~ ERROR explicit use of destructor method
23+
drop(self); //~ ERROR explicit use of destructor method
2424
}
2525
}
2626

tests/ui/explicit/explicit-call-to-supertrait-dtor.rs renamed to tests/ui/drop/explicit-call-to-supertrait-dtor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![allow(dropping_references)]
55

66
struct Foo {
7-
x: isize
7+
x: isize,
88
}
99

1010
#[allow(drop_bounds)]
@@ -20,7 +20,7 @@ impl Drop for Foo {
2020

2121
impl Bar for Foo {
2222
fn blah(&self) {
23-
self.drop(); //~ ERROR explicit use of destructor method
23+
self.drop(); //~ ERROR explicit use of destructor method
2424
}
2525
}
2626

tests/ui/explicit/explicit-self-lifetime-mismatch.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/ui/explicit/explicit-self-lifetime-mismatch.stderr

Lines changed: 0 additions & 41 deletions
This file was deleted.

tests/ui/invalid-module-declaration/auxiliary/foo/bar.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)