1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-05-09 08:00:41 +00:00

more error messages

[skip ci]
This commit is contained in:
Dominic 2021-03-09 16:17:11 +01:00
parent a57f1c097d
commit 2a35e044db
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
9 changed files with 62 additions and 2 deletions

View file

@ -0,0 +1,6 @@
use openapi_type::OpenapiType;
#[derive(OpenapiType)]
struct Foo(i64, i64);
fn main() {}

View file

@ -0,0 +1,5 @@
error: #[derive(OpenapiType)] does not support tuple structs
--> $DIR/tuple_struct.rs:4:11
|
4 | struct Foo(i64, i64);
| ^^^^^^^^^^

View file

@ -0,0 +1,8 @@
use openapi_type::OpenapiType;
#[derive(OpenapiType)]
enum Foo {
Pair(i64, i64)
}
fn main() {}

View file

@ -0,0 +1,5 @@
error: #[derive(OpenapiType)] does not support tuple variants
--> $DIR/tuple_variant.rs:5:6
|
5 | Pair(i64, i64)
| ^^^^^^^^^^

View file

@ -0,0 +1,9 @@
use openapi_type::OpenapiType;
#[derive(OpenapiType)]
union Foo {
signed: i64,
unsigned: u64
}
fn main() {}

View file

@ -0,0 +1,5 @@
error: #[derive(OpenapiType)] cannot be used on unions
--> $DIR/union.rs:4:1
|
4 | union Foo {
| ^^^^^

View file

@ -0,0 +1,7 @@
use openapi_type::OpenapiType;
#[derive(OpenapiType)]
#[openapi(pizza)]
struct Foo;
fn main() {}

View file

@ -0,0 +1,5 @@
error: Unexpected token
--> $DIR/unknown_attribute.rs:4:11
|
4 | #[openapi(pizza)]
| ^^^^^