diff --git a/core/codegen/tests/ui-fail-stable/from_param.rs b/core/codegen/tests/ui-fail-stable/from_param.rs new file mode 120000 index 0000000000..fcbf79fca6 --- /dev/null +++ b/core/codegen/tests/ui-fail-stable/from_param.rs @@ -0,0 +1 @@ +../ui-fail/from_param.rs \ No newline at end of file diff --git a/core/codegen/tests/ui-fail-stable/from_param.stderr b/core/codegen/tests/ui-fail-stable/from_param.stderr new file mode 100644 index 0000000000..c4ef4ebfaf --- /dev/null +++ b/core/codegen/tests/ui-fail-stable/from_param.stderr @@ -0,0 +1,55 @@ +error: named structs are not supported + --> tests/ui-fail-stable/from_param.rs:4:1 + | +4 | struct Foo1 { + | ^^^^^^ + +error: [note] error occurred while deriving `FromParam` + --> tests/ui-fail-stable/from_param.rs:3:10 + | +3 | #[derive(FromParam)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `FromParam` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: named structs are not supported + --> tests/ui-fail-stable/from_param.rs:9:1 + | +9 | struct Foo2 {} + | ^^^^^^ + +error: [note] error occurred while deriving `FromParam` + --> tests/ui-fail-stable/from_param.rs:8:10 + | +8 | #[derive(FromParam)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `FromParam` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: Only empty enums are accepted + --> tests/ui-fail-stable/from_param.rs:13:6 + | +13 | A(String), + | ^^^^^^^^ + +error: [note] error occurred while deriving `FromParam` + --> tests/ui-fail-stable/from_param.rs:11:10 + | +11 | #[derive(FromParam)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `FromParam` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: tuple structs are not supported + --> tests/ui-fail-stable/from_param.rs:21:1 + | +21 | struct Foo5(usize); + | ^^^^^^ + +error: [note] error occurred while deriving `FromParam` + --> tests/ui-fail-stable/from_param.rs:20:10 + | +20 | #[derive(FromParam)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `FromParam` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/from_param.rs b/core/codegen/tests/ui-fail/from_param.rs index 21168297f0..bfbe3edf1b 100644 --- a/core/codegen/tests/ui-fail/from_param.rs +++ b/core/codegen/tests/ui-fail/from_param.rs @@ -17,7 +17,7 @@ enum Foo3 { #[derive(FromParam)] enum Foo4 {} -#[derive(FromForm)] +#[derive(FromParam)] struct Foo5(usize); fn main() {}