Rocket/contrib/sync_db_pools/codegen/tests/ui-fail/database-syntax.rs

34 lines
567 B
Rust
Raw Normal View History

use rocket_sync_db_pools::database;
2018-12-12 08:00:10 +00:00
#[allow(unused_imports)]
use rocket_sync_db_pools::diesel;
2018-12-12 08:00:10 +00:00
#[database]
struct A(diesel::SqliteConnection);
#[database(1)]
struct B(diesel::SqliteConnection);
#[database(123)]
struct C(diesel::SqliteConnection);
#[database("hello" "hi")]
struct D(diesel::SqliteConnection);
#[database("test")]
enum Foo { }
#[database("test")]
struct Bar(diesel::SqliteConnection, diesel::SqliteConnection);
#[database("test")]
union Baz { }
#[database("test")]
struct E<'r>(&'r str);
#[database("test")]
struct F<T>(T);
fn main() { }