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

34 lines
578 B
Rust
Raw Normal View History

2018-12-12 08:00:10 +00:00
#[macro_use] extern crate rocket_contrib;
#[allow(unused_imports)]
2018-12-12 08:00:10 +00:00
use rocket_contrib::databases::diesel;
#[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() { }