Rocket/contrib/codegen/tests/ui-fail-nightly/database-syntax.stderr

58 lines
1.5 KiB
Plaintext
Raw Normal View History

error: unexpected end of input, expected literal
--> $DIR/database-syntax.rs:6:1
2018-12-12 08:00:10 +00:00
|
6 | #[database]
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^
2020-02-15 11:51:40 +00:00
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
2018-12-12 08:00:10 +00:00
error: expected string literal
--> $DIR/database-syntax.rs:10:12
|
10 | #[database(1)]
| ^
2018-12-12 08:00:10 +00:00
error: expected string literal
--> $DIR/database-syntax.rs:14:12
2018-12-12 08:00:10 +00:00
|
14 | #[database(123)]
2018-12-12 08:00:10 +00:00
| ^^^
error: unexpected token
--> $DIR/database-syntax.rs:18:20
2018-12-12 08:00:10 +00:00
|
18 | #[database("hello" "hi")]
| ^^^^
2018-12-12 08:00:10 +00:00
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:23:1
2018-12-12 08:00:10 +00:00
|
23 | enum Foo { }
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^^^
error: `database` attribute can only be applied to structs with exactly one unnamed field
--> $DIR/database-syntax.rs:27:11
2018-12-12 08:00:10 +00:00
|
27 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection);
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: example: `struct MyDatabase(diesel::SqliteConnection);`
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:31:1
2018-12-12 08:00:10 +00:00
|
31 | union Baz { }
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^^^^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:35:9
2018-12-12 08:00:10 +00:00
|
35 | struct E<'r>(&'r str);
2018-12-12 08:00:10 +00:00
| ^^^^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:39:9
2018-12-12 08:00:10 +00:00
|
39 | struct F<T>(T);
2018-12-12 08:00:10 +00:00
| ^^^