Skip to content

Commit 6aa4dcb

Browse files
committed
Add empty main() to tests where it is missing.
1 parent b4b7ccb commit 6aa4dcb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+75
-95
lines changed

src/test/ui/error-codes/E0522.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ fn cookie() -> ! {
1515
//~^^ ERROR definition of an unknown language item: `cookie` [E0522]
1616
loop {}
1717
}
18+
19+
fn main() {}

src/test/ui/error-codes/E0522.stderr

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
error[E0601]: main function not found in crate E0522
2-
31
error[E0522]: definition of an unknown language item: `cookie`
42
--> $DIR/E0522.rs:13:1
53
|
64
LL | #[lang = "cookie"]
75
| ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie`
86

9-
error: aborting due to 2 previous errors
7+
error: aborting due to previous error
108

11-
Some errors occurred: E0522, E0601.
12-
For more information about an error, try `rustc --explain E0522`.
9+
For more information about this error, try `rustc --explain E0522`.

src/test/ui/feature-gate-i128_type2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ fn test3_2() {
3030
enum A { //~ ERROR 128-bit type is unstable
3131
A(u64)
3232
}
33+
34+
fn main() {}

src/test/ui/feature-gate-i128_type2.stderr

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ LL | let x: u128 = 0; //~ ERROR 128-bit type is unstable
3030
|
3131
= help: add #![feature(i128_type)] to the crate attributes to enable
3232

33-
error[E0601]: main function not found in crate feature_gate_i128_type2
34-
3533
error[E0658]: repr with 128-bit type is unstable (see issue #35118)
3634
--> $DIR/feature-gate-i128_type2.rs:30:1
3735
|
@@ -42,7 +40,6 @@ LL | | }
4240
|
4341
= help: add #![feature(repr128)] to the crate attributes to enable
4442

45-
error: aborting due to 6 previous errors
43+
error: aborting due to 5 previous errors
4644

47-
Some errors occurred: E0601, E0658.
48-
For more information about an error, try `rustc --explain E0601`.
45+
For more information about this error, try `rustc --explain E0658`.

src/test/ui/feature-gate/issue-43106-gating-of-inline.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ mod inline {
3535
#[inline = "2100"] impl S { }
3636
//~^ ERROR attribute should be applied to function
3737
}
38+
39+
fn main() {}

src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
error[E0601]: main function not found in crate issue_43106_gating_of_inline
2-
31
error[E0518]: attribute should be applied to function
42
--> $DIR/issue-43106-gating-of-inline.rs:21:1
53
|
@@ -39,7 +37,6 @@ error[E0518]: attribute should be applied to function
3937
LL | #[inline = "2100"] impl S { }
4038
| ^^^^^^^^^^^^^^^^^^ ---------- not a function
4139

42-
error: aborting due to 6 previous errors
40+
error: aborting due to 5 previous errors
4341

44-
Some errors occurred: E0518, E0601.
45-
For more information about an error, try `rustc --explain E0518`.
42+
For more information about this error, try `rustc --explain E0518`.

src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@
1313
// `#![macro_escape]` is incompatible with crate-level `#![macro_use]`
1414
// already present in issue-43106-gating-of-builtin-attrs.
1515

16+
// must-compile-successfully
17+
1618
#![macro_escape]
1719
//~^ WARN macro_escape is a deprecated synonym for macro_use
20+
21+
fn main() {}
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
warning: macro_escape is a deprecated synonym for macro_use
2-
--> $DIR/issue-43106-gating-of-macro_escape.rs:16:1
2+
--> $DIR/issue-43106-gating-of-macro_escape.rs:18:1
33
|
44
LL | #![macro_escape]
55
| ^^^^^^^^^^^^^^^^
66
|
77
= help: consider an outer attribute, #[macro_use] mod ...
88

9-
error[E0601]: main function not found in crate issue_43106_gating_of_macro_escape
10-
11-
error: aborting due to previous error
12-
13-
For more information about this error, try `rustc --explain E0601`.

src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ mod proc_macro_derive2 {
4040
#[proc_macro_derive = "2500"] impl S { }
4141
//~^ ERROR the `#[proc_macro_derive]` attribute may only be used on bare functions
4242
}
43+
44+
fn main() {}

src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,5 @@ error: the `#[proc_macro_derive]` attribute may only be used on bare functions
3434
LL | #[proc_macro_derive = "2500"] impl S { }
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3636

37-
error[E0601]: main function not found in crate issue_43106_gating_of_proc_macro_derive
37+
error: aborting due to 6 previous errors
3838

39-
error: aborting due to 7 previous errors
40-
41-
For more information about this error, try `rustc --explain E0601`.

0 commit comments

Comments
 (0)