Add empty main() to tests where it is missing.
This commit is contained in:
parent
b4b7ccbd1c
commit
6aa4dcb9cf
@ -15,3 +15,5 @@ fn cookie() -> ! {
|
||||
//~^^ ERROR definition of an unknown language item: `cookie` [E0522]
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,12 +1,9 @@
|
||||
error[E0601]: main function not found in crate E0522
|
||||
|
||||
error[E0522]: definition of an unknown language item: `cookie`
|
||||
--> $DIR/E0522.rs:13:1
|
||||
|
|
||||
LL | #[lang = "cookie"]
|
||||
| ^^^^^^^^^^^^^^^^^^ definition of unknown language item `cookie`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0522, E0601.
|
||||
For more information about an error, try `rustc --explain E0522`.
|
||||
For more information about this error, try `rustc --explain E0522`.
|
||||
|
@ -30,3 +30,5 @@ fn test3_2() {
|
||||
enum A { //~ ERROR 128-bit type is unstable
|
||||
A(u64)
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -30,8 +30,6 @@ LL | let x: u128 = 0; //~ ERROR 128-bit type is unstable
|
||||
|
|
||||
= help: add #![feature(i128_type)] to the crate attributes to enable
|
||||
|
||||
error[E0601]: main function not found in crate feature_gate_i128_type2
|
||||
|
||||
error[E0658]: repr with 128-bit type is unstable (see issue #35118)
|
||||
--> $DIR/feature-gate-i128_type2.rs:30:1
|
||||
|
|
||||
@ -42,7 +40,6 @@ LL | | }
|
||||
|
|
||||
= help: add #![feature(repr128)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors occurred: E0601, E0658.
|
||||
For more information about an error, try `rustc --explain E0601`.
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -35,3 +35,5 @@ mod inline {
|
||||
#[inline = "2100"] impl S { }
|
||||
//~^ ERROR attribute should be applied to function
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_inline
|
||||
|
||||
error[E0518]: attribute should be applied to function
|
||||
--> $DIR/issue-43106-gating-of-inline.rs:21:1
|
||||
|
|
||||
@ -39,7 +37,6 @@ error[E0518]: attribute should be applied to function
|
||||
LL | #[inline = "2100"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^ ---------- not a function
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors occurred: E0518, E0601.
|
||||
For more information about an error, try `rustc --explain E0518`.
|
||||
For more information about this error, try `rustc --explain E0518`.
|
||||
|
@ -13,5 +13,9 @@
|
||||
// `#![macro_escape]` is incompatible with crate-level `#![macro_use]`
|
||||
// already present in issue-43106-gating-of-builtin-attrs.
|
||||
|
||||
// must-compile-successfully
|
||||
|
||||
#![macro_escape]
|
||||
//~^ WARN macro_escape is a deprecated synonym for macro_use
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,13 +1,8 @@
|
||||
warning: macro_escape is a deprecated synonym for macro_use
|
||||
--> $DIR/issue-43106-gating-of-macro_escape.rs:16:1
|
||||
--> $DIR/issue-43106-gating-of-macro_escape.rs:18:1
|
||||
|
|
||||
LL | #![macro_escape]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: consider an outer attribute, #[macro_use] mod ...
|
||||
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_macro_escape
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -40,3 +40,5 @@ mod proc_macro_derive2 {
|
||||
#[proc_macro_derive = "2500"] impl S { }
|
||||
//~^ ERROR the `#[proc_macro_derive]` attribute may only be used on bare functions
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -34,8 +34,5 @@ error: the `#[proc_macro_derive]` attribute may only be used on bare functions
|
||||
LL | #[proc_macro_derive = "2500"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_proc_macro_derive
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -36,3 +36,4 @@ mod rustc_deprecated {
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_rustc_deprecated
|
||||
|
||||
error: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:17:1
|
||||
|
|
||||
@ -42,6 +40,5 @@ error: stability attributes may not be used outside of the standard library
|
||||
LL | #[rustc_deprecated = "1500"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -35,3 +35,5 @@ mod stable {
|
||||
#[stable = "1300"] impl S { }
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_stable
|
||||
|
||||
error: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:17:1
|
||||
|
|
||||
@ -42,6 +40,5 @@ error: stability attributes may not be used outside of the standard library
|
||||
LL | #[stable = "1300"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -35,3 +35,5 @@ mod unstable {
|
||||
#[unstable = "1200"] impl S { }
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate issue_43106_gating_of_unstable
|
||||
|
||||
error: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:17:1
|
||||
|
|
||||
@ -42,6 +40,5 @@ error: stability attributes may not be used outside of the standard library
|
||||
LL | #[unstable = "1200"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -12,3 +12,5 @@
|
||||
|
||||
const A: u8 = { yield 3u8; 3u8};
|
||||
//~^ ERROR yield statement outside
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,12 +1,9 @@
|
||||
error[E0601]: main function not found in crate yield_in_const
|
||||
|
||||
error[E0627]: yield statement outside of generator literal
|
||||
--> $DIR/yield-in-const.rs:13:17
|
||||
|
|
||||
LL | const A: u8 = { yield 3u8; 3u8};
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0601, E0627.
|
||||
For more information about an error, try `rustc --explain E0601`.
|
||||
For more information about this error, try `rustc --explain E0627`.
|
||||
|
@ -12,3 +12,5 @@
|
||||
|
||||
static B: u8 = { yield 3u8; 3u8};
|
||||
//~^ ERROR yield statement outside
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,12 +1,9 @@
|
||||
error[E0601]: main function not found in crate yield_in_static
|
||||
|
||||
error[E0627]: yield statement outside of generator literal
|
||||
--> $DIR/yield-in-static.rs:13:18
|
||||
|
|
||||
LL | static B: u8 = { yield 3u8; 3u8};
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0601, E0627.
|
||||
For more information about an error, try `rustc --explain E0601`.
|
||||
For more information about this error, try `rustc --explain E0627`.
|
||||
|
@ -36,3 +36,5 @@ fn g() {
|
||||
mod baz { pub use two_macros::m; }
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -36,9 +36,6 @@ LL | | }
|
||||
| |_^
|
||||
= note: macro-expanded items do not shadow when used in a macro invocation path
|
||||
|
||||
error[E0601]: main function not found in crate macro_paths
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors occurred: E0601, E0659.
|
||||
For more information about an error, try `rustc --explain E0601`.
|
||||
For more information about this error, try `rustc --explain E0659`.
|
||||
|
@ -49,3 +49,5 @@ mod m4 {
|
||||
use two_macros::m;
|
||||
m!(); //~ ERROR ambiguous
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -51,9 +51,6 @@ LL | use two_macros::m;
|
||||
| ^^^^^^^^^^^^^
|
||||
= note: macro-expanded macro imports do not shadow
|
||||
|
||||
error[E0601]: main function not found in crate macros
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors occurred: E0601, E0659.
|
||||
For more information about an error, try `rustc --explain E0601`.
|
||||
For more information about this error, try `rustc --explain E0659`.
|
||||
|
@ -20,3 +20,5 @@ impl Deref for Struct {
|
||||
}
|
||||
}
|
||||
//~^^^^ ERROR cannot infer an appropriate lifetime for lifetime parameter
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate mismatched_trait_impl_2
|
||||
|
||||
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
|
||||
--> $DIR/mismatched_trait_impl-2.rs:18:5
|
||||
|
|
||||
@ -18,7 +16,6 @@ LL | | }
|
||||
expected fn(&Struct) -> &Trait + 'static
|
||||
found fn(&Struct) -> &Trait
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0495, E0601.
|
||||
For more information about an error, try `rustc --explain E0495`.
|
||||
For more information about this error, try `rustc --explain E0495`.
|
||||
|
@ -14,3 +14,5 @@ trait T {
|
||||
}
|
||||
//~^^ ERROR function is expected to take a single 0-tuple as argument
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate issue_47706_trait
|
||||
|
||||
error[E0593]: function is expected to take a single 0-tuple as argument, but it takes 2 distinct arguments
|
||||
--> $DIR/issue-47706-trait.rs:13:20
|
||||
|
|
||||
@ -8,7 +6,6 @@ LL | fn f(&self, _: ()) {
|
||||
LL | None::<()>.map(Self::f);
|
||||
| ^^^ expected function that takes a single 0-tuple as argument
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0593, E0601.
|
||||
For more information about an error, try `rustc --explain E0593`.
|
||||
For more information about this error, try `rustc --explain E0593`.
|
||||
|
@ -18,3 +18,5 @@ struct X {
|
||||
|
||||
impl m1::X for X { //~ ERROR not all trait items implemented
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,3 @@
|
||||
error[E0601]: main function not found in crate m2
|
||||
|
||||
error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method`
|
||||
--> $DIR/m2.rs:19:1
|
||||
|
|
||||
@ -10,7 +8,6 @@ LL | impl m1::X for X { //~ ERROR not all trait items implemented
|
||||
= note: `Type` from trait: `type Type;`
|
||||
= note: `method` from trait: `fn(&Self, std::string::String) -> <Self as m1::X>::Type`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
Some errors occurred: E0046, E0601.
|
||||
For more information about an error, try `rustc --explain E0046`.
|
||||
For more information about this error, try `rustc --explain E0046`.
|
||||
|
@ -111,3 +111,5 @@ impl Foo for Box<isize> {
|
||||
//~^ ERROR cannot find value `bah`
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -142,9 +142,6 @@ error[E0425]: cannot find value `bah` in this scope
|
||||
LL | bah;
|
||||
| ^^^ help: try: `Self::bah`
|
||||
|
||||
error[E0601]: main function not found in crate issue_14254
|
||||
error: aborting due to 24 previous errors
|
||||
|
||||
error: aborting due to 25 previous errors
|
||||
|
||||
Some errors occurred: E0425, E0601.
|
||||
For more information about an error, try `rustc --explain E0425`.
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
|
@ -27,3 +27,5 @@ pub mod baz {
|
||||
struct Foo;
|
||||
impl T for Foo { }
|
||||
//~^ ERROR cannot find trait `T`
|
||||
|
||||
fn main() {}
|
||||
|
@ -8,7 +8,5 @@ help: possible candidate is found in another module, you can import it into scop
|
||||
LL | use foo::bar::T;
|
||||
|
|
||||
|
||||
error[E0601]: main function not found in crate issue_21221_2
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
||||
|
@ -65,3 +65,5 @@ fn h8() -> i32 {
|
||||
a::b()
|
||||
//~^ ERROR expected function, found module `a::b`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -72,9 +72,6 @@ LL | a::b()
|
||||
| |
|
||||
| did you mean `I`?
|
||||
|
||||
error[E0601]: main function not found in crate suggest_path_instead_of_mod_dot_item
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
Some errors occurred: E0423, E0601.
|
||||
For more information about an error, try `rustc --explain E0423`.
|
||||
For more information about this error, try `rustc --explain E0423`.
|
||||
|
@ -20,3 +20,5 @@ impl<T: Clone, Add> Add for Foo<T> {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -8,7 +8,5 @@ help: possible better candidate is found in another module, you can import it in
|
||||
LL | use std::ops::Add;
|
||||
|
|
||||
|
||||
error[E0601]: main function not found in crate issue_35987
|
||||
|
||||
error: cannot continue compilation due to previous error
|
||||
|
||||
|
@ -17,3 +17,5 @@ pub fn trace_option(option: Option<isize>) {
|
||||
|
||||
} //~ ERROR: incorrect close delimiter
|
||||
//~^ ERROR: expected expression, found `)`
|
||||
|
||||
fn main() {}
|
||||
|
@ -22,8 +22,5 @@ error: expected expression, found `)`
|
||||
LL | } //~ ERROR: incorrect close delimiter
|
||||
| ^ expected expression
|
||||
|
||||
error[E0601]: main function not found in crate issue_10636_2
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0601`.
|
||||
|
@ -11,3 +11,5 @@
|
||||
impl S { //~ ERROR cannot find type
|
||||
pub
|
||||
} //~ ERROR expected one of
|
||||
|
||||
fn main() {}
|
||||
|
@ -12,9 +12,6 @@ error[E0412]: cannot find type `S` in this scope
|
||||
LL | impl S { //~ ERROR cannot find type
|
||||
| ^ not found in this scope
|
||||
|
||||
error[E0601]: main function not found in crate issue_41155
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors occurred: E0412, E0601.
|
||||
For more information about an error, try `rustc --explain E0412`.
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
|
Loading…
Reference in New Issue
Block a user