Skip to content

Commit 8d6e68b

Browse files
authored
Rollup merge of rust-lang#149411 - reddevilmidzy:t5, r=Kivooeo
Tidying up UI tests [5/N] > [!NOTE] > Intermediate commits are intended to help review, but will be squashed prior to merge. part of rust-lang#133895 merge directory * `macro_backtrace` -> `macros` * `missing_non_modrs_mod` -> `modules` * `modules_and_files_visibility` -> `modules` * `qualified` -> `typeck` * `while` -> `for-loop-whlie` r? Kivooeo
2 parents 3f1e4f8 + ace4aeb commit 8d6e68b

34 files changed

+84
-143
lines changed

tests/ui/README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,6 @@ Exercise *Link-Time Optimization* (LTO), involving the flags `-C lto` or `-Z thi
891891

892892
Tests on changes to inference variable lattice LUB/GLB, see <https://github.com/rust-lang/rust/pull/45853>.
893893

894-
## `tests/ui/macro_backtrace/`: `-Zmacro-backtrace`
895-
896-
Contains a single test, checking the unstable command-line flag to enable detailed macro backtraces.
897-
898-
**FIXME**: This could be merged with `ui/macros`, which already contains other macro backtrace tests.
899-
900894
## `tests/ui/macros/`
901895

902896
Broad category of tests on macros.
@@ -945,12 +939,6 @@ Something is missing which could be added to fix (e.g. suggestions).
945939

946940
**FIXME**: this is way too vague, tests should be rehomed.
947941

948-
## `tests/ui/missing_non_modrs_mod/`
949-
950-
This directory is a small tree of `mod` dependencies, but the root, `foo.rs`, is looking for a file which does not exist. The test checks that the error is reported at the top-level module.
951-
952-
**FIXME**: Merge with `tests/ui/modules/`.
953-
954942
## `tests/ui/missing-trait-bounds/`
955943

956944
Tests for checking missing trait bounds, and their diagnostics.
@@ -963,10 +951,6 @@ Tests on the module system.
963951

964952
**FIXME**: `tests/ui/imports/` should probably be merged with this.
965953

966-
## `tests/ui/modules_and_files_visibility/`
967-
968-
**FIXME**: Merge with `tests/ui/modules/`.
969-
970954
## `tests/ui/moves`
971955

972956
Tests on moves (destructive moves).
@@ -1135,12 +1119,6 @@ A large category about function and type public/private visibility, and its impa
11351119

11361120
**FIXME**: merge with `tests/ui/privacy/`.
11371121

1138-
## `tests/ui/qualified/`
1139-
1140-
Contains few tests on qualified paths where a type parameter is provided at the end: `type A = <S as Tr>::A::f<u8>;`. The tests check if this fails during type checking, not parsing.
1141-
1142-
**FIXME**: Should be rehomed to `ui/typeck`.
1143-
11441122
## `tests/ui/query-system/`
11451123

11461124
Tests on Rust methods and functions which use the query system, such as `std::mem::size_of`. These compute information about the current runtime and return it. See [Query system | rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html).
@@ -1583,12 +1561,6 @@ Tests on various well-formedness checks, e.g. [Type-checking normal functions](h
15831561

15841562
Tests on `where` clauses. See [Where clauses | Reference](https://doc.rust-lang.org/reference/items/generics.html#where-clauses).
15851563

1586-
## `tests/ui/while/`
1587-
1588-
Tests on the `while` keyword and the `while` construct.
1589-
1590-
**FIXME**: merge with `ui/for-loop-while`.
1591-
15921564
## `tests/ui/windows-subsystem/`: `#![windows_subsystem = ""]`
15931565

15941566
See [the `windows_subsystem` attribute](https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute).
File renamed without changes.

tests/ui/while/while-let-scope-issue-40235.rs renamed to tests/ui/for-loop-while/while-let-scope.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ check-pass
2+
// regression test for #40235
23
#![allow(unused_variables)]
34
fn foo() {}
45

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
// Test that the macro backtrace facility works (supporting file)
1+
// Test that the macro backtrace facility works (supporting macro-backtrace-complex.rs)
22

33
// a non-local macro
44
#[macro_export]
55
macro_rules! ping {
66
() => {
77
pong!();
8-
}
8+
};
99
}
1010

1111
#[macro_export]
1212
macro_rules! deep {
1313
() => {
1414
foo!();
15-
}
15+
};
1616
}
1717

1818
#[macro_export]
1919
macro_rules! foo {
2020
() => {
2121
bar!();
22-
}
22+
};
2323
}
2424

2525
#[macro_export]
2626
macro_rules! bar {
2727
() => {
2828
ping!();
29-
}
29+
};
3030
}

tests/ui/macro_backtrace/main.-Zmacro-backtrace.stderr renamed to tests/ui/macros/macro-backtrace-complex.-Zmacro-backtrace.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
2-
--> $DIR/main.rs:10:20
2+
--> $DIR/macro-backtrace-complex.rs:12:20
33
|
44
LL | / macro_rules! pong {
55
LL | | () => { syntax error };
@@ -11,7 +11,7 @@ LL | pong!();
1111
| ------- in this macro invocation
1212

1313
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
14-
--> $DIR/main.rs:10:20
14+
--> $DIR/macro-backtrace-complex.rs:12:20
1515
|
1616
LL | / macro_rules! pong {
1717
LL | | () => { syntax error };
@@ -31,7 +31,7 @@ LL | pong!();
3131
| ------- in this macro invocation (#2)
3232

3333
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
34-
--> $DIR/main.rs:10:20
34+
--> $DIR/macro-backtrace-complex.rs:12:20
3535
|
3636
LL | / macro_rules! pong {
3737
LL | | () => { syntax error };

tests/ui/macro_backtrace/main.default.stderr renamed to tests/ui/macros/macro-backtrace-complex.default.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
2-
--> $DIR/main.rs:10:20
2+
--> $DIR/macro-backtrace-complex.rs:12:20
33
|
44
LL | () => { syntax error };
55
| ^^^^^ expected one of 8 possible tokens
@@ -10,7 +10,7 @@ LL | pong!();
1010
= note: this error originates in the macro `pong` (in Nightly builds, run with -Z macro-backtrace for more info)
1111

1212
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
13-
--> $DIR/main.rs:10:20
13+
--> $DIR/macro-backtrace-complex.rs:12:20
1414
|
1515
LL | () => { syntax error };
1616
| ^^^^^ expected one of 8 possible tokens
@@ -21,7 +21,7 @@ LL | ping!();
2121
= note: this error originates in the macro `pong` which comes from the expansion of the macro `ping` (in Nightly builds, run with -Z macro-backtrace for more info)
2222

2323
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
24-
--> $DIR/main.rs:10:20
24+
--> $DIR/macro-backtrace-complex.rs:12:20
2525
|
2626
LL | () => { syntax error };
2727
| ^^^^^ expected one of 8 possible tokens

tests/ui/macro_backtrace/main.rs renamed to tests/ui/macros/macro-backtrace-complex.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
// Test that the macro backtrace facility works
1+
// Test the unstable command-line flag (-Z macro-backtrace) to enable detailed macro backtraces
2+
// across nested local and external macros.
23
//@ aux-build:ping.rs
34
//@ revisions: default -Zmacro-backtrace
45
//@[-Zmacro-backtrace] compile-flags: -Z macro-backtrace
56

6-
#[macro_use] extern crate ping;
7+
#[macro_use]
8+
extern crate ping;
79

810
// a local macro
911
macro_rules! pong {

0 commit comments

Comments
 (0)