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

58 lines
1.6 KiB
Plaintext
Raw Normal View History

Revamp configuration. This commit completely overhauls Rocket's configuration systems, basing it on the new Figment library. It includes many breaking changes pertaining to configuration. They are: * "Environments" are replaced by "profiles". * 'ROCKET_PROFILE' takes the place of 'ROCKET_ENV'. * Profile names are now arbitrary, but 'debug' and 'release' are given special treatment as default profiles for the debug and release compilation profiles. * A 'default' profile now sits along-side the meta 'global' profile. * The concept of "extras" is no longer present; users can extract any values they want from the configured 'Figment'. * The 'Poolable' trait takes an '&Config'. * The 'secrets' feature is disabled by default. * It is a hard error if 'secrets' is enabled under the 'release' profile and no 'secret_key' is configured. * 'ConfigBuilder' no longer exists: all fields of 'Config' are public with public constructors for each type. * 'keep_alive' is disabled with '0', not 'false' or 'off'. * Inlined error variants into the 'Error' structure. * 'LoggingLevel' is now 'LogLevel'. * Limits can now be specified in SI units: "1 MiB". The summary of other changes are: * The default config file can be configured with 'ROCKET_CONFIG'. * HTTP/1 and HTTP/2 keep-alive configuration is restored. * 'ctrlc' is now a recognized config option. * 'serde' is now a core dependency. * TLS misconfiguration errors are improved. * Several example use '_' as the return type of '#[launch]' fns. * 'AdHoc::config()' was added for simple config extraction. * Added more documentation for using 'Limits'. * Launch information is no longer treated specially. * The configuration guide was rewritten. Resolves #852. Resolves #209. Closes #1404. Closes #652.
2020-09-03 05:41:31 +00:00
error: unexpected end of input, expected string literal
--> tests/ui-fail-nightly/database-syntax.rs:27:1
|
27 | #[database]
| ^^^^^^^^^^^
|
= note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-12-12 08:00:10 +00:00
error: expected string literal
--> tests/ui-fail-nightly/database-syntax.rs:30:12
|
30 | #[database(1)]
| ^
2018-12-12 08:00:10 +00:00
error: expected string literal
--> tests/ui-fail-nightly/database-syntax.rs:33:12
2018-12-12 08:00:10 +00:00
|
33 | #[database(123)]
2018-12-12 08:00:10 +00:00
| ^^^
error: unexpected token
--> tests/ui-fail-nightly/database-syntax.rs:36:20
2018-12-12 08:00:10 +00:00
|
36 | #[database("hello" "hi")]
| ^^^^
2018-12-12 08:00:10 +00:00
error: `database` attribute can only be used on structs
--> tests/ui-fail-nightly/database-syntax.rs:40:1
2018-12-12 08:00:10 +00:00
|
40 | enum Foo { }
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^^^
error: `database` attribute can only be applied to structs with exactly one unnamed field
--> tests/ui-fail-nightly/database-syntax.rs:43:11
2018-12-12 08:00:10 +00:00
|
43 | struct Bar(Connection, Connection);
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-12-12 08:00:10 +00:00
|
= help: example: `struct MyDatabase(diesel::SqliteConnection);`
error: `database` attribute can only be used on structs
--> tests/ui-fail-nightly/database-syntax.rs:46:1
2018-12-12 08:00:10 +00:00
|
46 | union Baz { }
2018-12-12 08:00:10 +00:00
| ^^^^^^^^^^^^^^
error: `database` attribute cannot be applied to structs with generics
--> tests/ui-fail-nightly/database-syntax.rs:49:9
2018-12-12 08:00:10 +00:00
|
49 | struct E<'r>(&'r str);
2018-12-12 08:00:10 +00:00
| ^^^^
error: `database` attribute cannot be applied to structs with generics
--> tests/ui-fail-nightly/database-syntax.rs:52:9
2018-12-12 08:00:10 +00:00
|
52 | struct F<T>(T);
2018-12-12 08:00:10 +00:00
| ^^^