Skip to content

Commit

Permalink
Correctly implement failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loikki committed Aug 2, 2024
1 parent 9df9014 commit 69dac9a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/codegen/tests/ui-fail-stable/from_param.rs
55 changes: 55 additions & 0 deletions core/codegen/tests/ui-fail-stable/from_param.stderr
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion core/codegen/tests/ui-fail/from_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum Foo3 {
#[derive(FromParam)]
enum Foo4 {}

#[derive(FromForm)]
#[derive(FromParam)]
struct Foo5(usize);

fn main() {}

0 comments on commit 69dac9a

Please sign in to comment.