diff --git a/testcrate/tests/compile-fail/enum-with-discriminants.rs b/testcrate/tests/compile-fail/enum-with-discriminants.rs index b648617..dbc300b 100644 --- a/testcrate/tests/compile-fail/enum-with-discriminants.rs +++ b/testcrate/tests/compile-fail/enum-with-discriminants.rs @@ -8,3 +8,5 @@ enum Enum { Foo, Bar = 42, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/enum-zero-variants.rs b/testcrate/tests/compile-fail/enum-zero-variants.rs index ca3492c..6b3c7b5 100644 --- a/testcrate/tests/compile-fail/enum-zero-variants.rs +++ b/testcrate/tests/compile-fail/enum-zero-variants.rs @@ -5,3 +5,5 @@ extern crate derive_new; //~^ ERROR proc-macro derive //~^^ HELP #[derive(new)] cannot be implemented for enums with zero variants enum Enum {} + +fn main() {} diff --git a/testcrate/tests/compile-fail/multiple-new-attrs.rs b/testcrate/tests/compile-fail/multiple-new-attrs.rs index 1e3a787..c4591ad 100644 --- a/testcrate/tests/compile-fail/multiple-new-attrs.rs +++ b/testcrate/tests/compile-fail/multiple-new-attrs.rs @@ -10,3 +10,5 @@ struct Foo { #[new(value = "42")] y: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-invalid-attr-type.rs b/testcrate/tests/compile-fail/new-invalid-attr-type.rs index 7f55756..11096cc 100644 --- a/testcrate/tests/compile-fail/new-invalid-attr-type.rs +++ b/testcrate/tests/compile-fail/new-invalid-attr-type.rs @@ -8,3 +8,5 @@ struct Foo { #[new = "foo"] x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-invalid-value.rs b/testcrate/tests/compile-fail/new-invalid-value.rs index 7fab768..a7d2ec4 100644 --- a/testcrate/tests/compile-fail/new-invalid-value.rs +++ b/testcrate/tests/compile-fail/new-invalid-value.rs @@ -5,6 +5,8 @@ extern crate derive_new; //~^ ERROR produced unparsable tokens struct Foo { #[new(value = "hello@world")] -//~^ ERROR expected one of + //~^ ERROR expected one of x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-list-invalid.rs b/testcrate/tests/compile-fail/new-list-invalid.rs index c64e07d..b7a13af 100644 --- a/testcrate/tests/compile-fail/new-list-invalid.rs +++ b/testcrate/tests/compile-fail/new-list-invalid.rs @@ -8,3 +8,5 @@ struct Foo { #[new(foo)] x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-name-value-invalid.rs b/testcrate/tests/compile-fail/new-name-value-invalid.rs index e3f2625..a1fba92 100644 --- a/testcrate/tests/compile-fail/new-name-value-invalid.rs +++ b/testcrate/tests/compile-fail/new-name-value-invalid.rs @@ -8,3 +8,5 @@ struct Foo { #[new(foo = "bar")] x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-nested-list.rs b/testcrate/tests/compile-fail/new-nested-list.rs index 88aec1f..2c40aa2 100644 --- a/testcrate/tests/compile-fail/new-nested-list.rs +++ b/testcrate/tests/compile-fail/new-nested-list.rs @@ -8,3 +8,5 @@ struct Foo { #[new(foo("bar"))] x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-nested-literal.rs b/testcrate/tests/compile-fail/new-nested-literal.rs index 8fe3c6e..cea3c54 100644 --- a/testcrate/tests/compile-fail/new-nested-literal.rs +++ b/testcrate/tests/compile-fail/new-nested-literal.rs @@ -3,8 +3,10 @@ extern crate derive_new; #[derive(new)] //~^ ERROR proc-macro derive -//~^^ HELP Invalid #[new] attribute: literal value in #[new(..)] +//~^^ HELP Invalid #[new] attribute: expected identifier struct Foo { #[new("foo")] x: i32, } + +fn main() {} diff --git a/testcrate/tests/compile-fail/new-non-literal-value.rs b/testcrate/tests/compile-fail/new-non-literal-value.rs index 531adfc..232d24a 100644 --- a/testcrate/tests/compile-fail/new-non-literal-value.rs +++ b/testcrate/tests/compile-fail/new-non-literal-value.rs @@ -8,3 +8,5 @@ struct Foo { #[new(value = false)] x: i32, } + +fn main() {}