2020-09-03 05:41:31 +00:00
|
|
|
error: unexpected end of input, expected string literal
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:6:1
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
|
|
|
6 | #[database]
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2021-08-01 19:24:48 +00:00
|
|
|
= note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
|
|
error: expected string literal
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:9:12
|
2020-07-21 17:23:59 +00:00
|
|
|
|
|
|
|
|
9 | #[database(1)]
|
|
|
|
| ^
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
|
|
error: expected string literal
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:12:12
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
12 | #[database(123)]
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: unexpected token
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:15:20
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
15 | #[database("hello" "hi")]
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: `database` attribute can only be used on structs
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:19:1
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
19 | enum Foo { }
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: `database` attribute can only be applied to structs with exactly one unnamed field
|
2022-02-16 18:08:55 +00:00
|
|
|
--- help: example: `struct MyDatabase(diesel::SqliteConnection);`
|
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:22:11
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
22 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection);
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `database` attribute can only be used on structs
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:25:1
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
25 | union Baz { }
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
error: `database` attribute cannot be applied to structs with generics
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:28:9
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
28 | struct E<'r>(&'r str);
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^
|
|
|
|
|
|
|
|
error: `database` attribute cannot be applied to structs with generics
|
2022-02-16 18:08:55 +00:00
|
|
|
--> tests/ui-fail-stable/database-syntax.rs:31:9
|
2020-07-20 22:02:10 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
31 | struct F<T>(T);
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^
|