Skip to content

Commit a5dc701

Browse files
committed
Relocate some tests and remove fn-main directory
Relocate issues/issue-51022.rs to entry-point/main-with-lifetime-param.rs Relocate issue-50714.rs to entry-point/main-where-fn-bound.rs Rename issue-118772.rs to main-with-invalid-signature.rs and delete duplicate test remove ui/entry-point/issue-118772.rs in issues.txt Relocate fn-main/wrong-location.rs to entry-point/main-in-submodule.rs Remove fn-main directory Relocate issue-50688.rs to mismatched_types/array-len-is-closure.rs
1 parent 6840234 commit a5dc701

16 files changed

+21
-40
lines changed

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ ui/dst/issue-90528-unsizing-suggestion-4.rs
930930
ui/dyn-keyword/issue-5153.rs
931931
ui/dyn-keyword/issue-56327-dyn-trait-in-macro-is-okay.rs
932932
ui/empty/issue-37026.rs
933-
ui/entry-point/issue-118772.rs
934933
ui/enum-discriminant/auxiliary/issue-41394.rs
935934
ui/enum-discriminant/issue-104519.rs
936935
ui/enum-discriminant/issue-41394-rpass.rs

tests/ui/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,6 @@ Exercises the `format!` macro.
585585

586586
A broad category of tests on functions.
587587

588-
## `tests/ui/fn-main/`
589-
590-
**FIXME**: Serves a duplicate purpose with `ui/entry-point`, should be combined.
591-
592588
## `tests/ui/for/`: `for` keyword
593589

594590
Tests on the `for` keyword and some of its associated errors, such as attempting to write the faulty pattern `for _ in 0..1 {} else {}`.
File renamed without changes.

tests/ui/fn-main/wrong-location.stderr renamed to tests/ui/entry-point/main-in-submodule.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0601]: `main` function not found in crate `wrong_location`
2-
--> $DIR/wrong-location.rs:5:2
1+
error[E0601]: `main` function not found in crate `main_in_submodule`
2+
--> $DIR/main-in-submodule.rs:5:2
33
|
44
LL | }
5-
| ^ the main function must be defined at the crate level (in `$DIR/wrong-location.rs`)
5+
| ^ the main function must be defined at the crate level (in `$DIR/main-in-submodule.rs`)
66
|
77
note: here is a function named `main`
8-
--> $DIR/wrong-location.rs:4:5
8+
--> $DIR/main-in-submodule.rs:4:5
99
|
1010
LL | fn main() { }
1111
| ^^^^^^^^^
File renamed without changes.

tests/ui/issues/issue-50714.stderr renamed to tests/ui/entry-point/main-where-fn-bound.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0646]: `main` function is not allowed to have a `where` clause
2-
--> $DIR/issue-50714.rs:3:11
2+
--> $DIR/main-where-fn-bound.rs:3:11
33
|
44
LL | fn main() where fn(&()): Eq {}
55
| ^^^^^^^^^^^^^^^^^ `main` cannot have a `where` clause
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/118772>
2+
13
fn main(_: &i32) { //~ ERROR `main` function has wrong type
24
println!("Hello, world!");
35
}

tests/ui/entry-point/issue-118772.stderr renamed to tests/ui/entry-point/main-with-invalid-signature.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0580]: `main` function has wrong type
2-
--> $DIR/issue-118772.rs:1:1
2+
--> $DIR/main-with-invalid-signature.rs:3:1
33
|
44
LL | fn main(_: &i32) {
55
| ^^^^^^^^^^^^^^^^ incorrect number of function parameters
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/51022>
2+
3+
fn main<'a>() {}
4+
//~^ ERROR `main` function is not allowed to have generic parameters [E0131]

tests/ui/issues/issue-51022.stderr renamed to tests/ui/entry-point/main-with-lifetime-param.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0131]: `main` function is not allowed to have generic parameters
2-
--> $DIR/issue-51022.rs:1:8
2+
--> $DIR/main-with-lifetime-param.rs:3:8
33
|
4-
LL | fn main<'a>() { }
4+
LL | fn main<'a>() {}
55
| ^^^^ `main` cannot have generic parameters
66

77
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)