Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Commit 39b32c9

Browse files
committed
Hack around weird cfail test features
1 parent f8a33d6 commit 39b32c9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

postgres-derive-macros/tests/compile-fail/bad-override.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ macro_rules! to_sql_checked {
55
() => ()
66
}
77

8-
#[derive(ToSql)]
8+
#[derive(Clone, ToSql)]
99
#[postgres(
1010
foo = "bar" //~ ERROR unknown attribute key `foo`
1111
)]

postgres-derive-macros/tests/compile-fail/big-tuple-struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ macro_rules! to_sql_checked {
55
() => ()
66
}
77

8-
#[derive(ToSql)] //~ ERROR #[derive(ToSql)] can only be applied to structs, single field tuple structs, and enums
8+
#[derive(Clone, ToSql)] //~ ERROR #[derive(ToSql)] can only be applied to structs, single field tuple structs, and enums
99
struct Foo(i32, i32);
1010

11-
#[derive(FromSql)] //~ ERROR #[derive(FromSql)] can only be applied to structs, single field tuple structs, and enums
11+
#[derive(Clone, FromSql)] //~ ERROR #[derive(FromSql)] can only be applied to structs, single field tuple structs, and enums
1212
struct Bar(i32, i32);
1313

1414
fn main() {}

postgres-derive-macros/tests/compile-fail/complex-enum.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ macro_rules! to_sql_checked {
55
() => ()
66
}
77

8-
#[derive(ToSql)]
8+
#[derive(Clone, ToSql)]
99
enum Foo {
1010
Bar(i32), //~ ERROR #[derive(ToSql)] does not support non-C-like enums
1111
Baz { b: i32 }, //~ ERROR #[derive(ToSql)] does not support non-C-like enums
1212
}
1313

14-
#[derive(FromSql)]
15-
enum Foo {
14+
#[derive(Clone, FromSql)]
15+
enum Bar {
1616
Bar(i32), //~ ERROR #[derive(FromSql)] does not support non-C-like enums
1717
Baz { b: i32 }, //~ ERROR #[derive(FromSql)] does not support non-C-like enums
1818
}

0 commit comments

Comments
 (0)