Rocket/core/codegen/tests/ui-fail-nightly/route-path-bad-syntax.stderr

264 lines
6.2 KiB
Plaintext
Raw Normal View History

2020-07-16 12:46:20 +00:00
error: invalid path URI: expected token / but found a at index 0
--> $DIR/route-path-bad-syntax.rs:5:8
|
5 | #[get("a")]
| ^^
|
= help: expected path in origin form: "/path/<param>"
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: invalid path URI: unexpected EOF: expected token / at index 0
--> $DIR/route-path-bad-syntax.rs:8:8
|
8 | #[get("")]
| ^
|
= help: expected path in origin form: "/path/<param>"
2020-07-16 12:46:20 +00:00
error: invalid path URI: expected token / but found a at index 0
--> $DIR/route-path-bad-syntax.rs:11:8
|
11 | #[get("a/b/c")]
| ^^^^^^
|
= help: expected path in origin form: "/path/<param>"
error: paths cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:14:7
|
14 | #[get("/a///b")]
| ^^^^^^^^
|
= note: expected '/a/b', found '/a///b'
error: query cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:17:10
|
17 | #[get("/?bat&&")]
| ^^^^^
error: query cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:20:10
|
20 | #[get("/?bat&&")]
| ^^^^^
error: paths cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:23:7
|
23 | #[get("/a/b//")]
| ^^^^^^^^
|
= note: expected '/a/b', found '/a/b//'
2020-07-16 12:46:20 +00:00
error: invalid path URI: expected EOF but found # at index 3
--> $DIR/route-path-bad-syntax.rs:28:11
|
28 | #[get("/!@#$%^&*()")]
| ^^^^^^^^^
|
= help: expected path in origin form: "/path/<param>"
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:31:9
|
31 | #[get("/a%20b")]
| ^^^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:34:11
|
34 | #[get("/a?a%20b")]
| ^^^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:37:11
|
37 | #[get("/a?a+b")]
| ^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:42:9
|
42 | #[get("/<name>")]
| ^^^^^^
|
note: expected argument named `name` here
--> $DIR/route-path-bad-syntax.rs:43:6
|
43 | fn h0(_name: usize) {}
| ^^^^^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:45:11
|
45 | #[get("/a?<r>")]
| ^^^
|
note: expected argument named `r` here
--> $DIR/route-path-bad-syntax.rs:46:6
|
46 | fn h1() {}
| ^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:48:22
|
48 | #[post("/a", data = "<test>")]
| ^^^^^^
|
note: expected argument named `test` here
--> $DIR/route-path-bad-syntax.rs:49:6
|
49 | fn h2() {}
| ^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:51:9
|
51 | #[get("/<_r>")]
| ^^^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:52:6
|
52 | fn h3() {}
| ^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:54:9
|
54 | #[get("/<_r>/<b>")]
| ^^^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:55:6
|
55 | fn h4() {}
| ^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:54:14
|
54 | #[get("/<_r>/<b>")]
| ^^^
|
note: expected argument named `b` here
--> $DIR/route-path-bad-syntax.rs:55:6
|
55 | fn h4() {}
| ^^
error: `foo_.` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:60:9
|
60 | #[get("/<foo_.>")]
| ^^^^^^^
|
= help: parameter names must be valid identifiers
error: `foo*` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:63:9
|
63 | #[get("/<foo*>")]
| ^^^^^^
|
= help: parameter names must be valid identifiers
error: `!` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:66:9
|
66 | #[get("/<!>")]
| ^^^
|
= help: parameter names must be valid identifiers
error: `name>:<id` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:69:9
|
69 | #[get("/<name>:<id>")]
| ^^^^^^^^^^^
|
= help: parameter names must be valid identifiers
error: malformed parameter
--> $DIR/route-path-bad-syntax.rs:74:20
|
74 | #[get("/", data = "foo")]
| ^^^
|
= help: parameter must be of the form '<param>'
error: malformed parameter
--> $DIR/route-path-bad-syntax.rs:77:20
|
77 | #[get("/", data = "<foo..>")]
| ^^^^^^^
|
= help: parameter must be of the form '<param>'
error: parameter is missing a closing bracket
--> $DIR/route-path-bad-syntax.rs:80:20
|
80 | #[get("/", data = "<foo")]
| ^^^^
|
= help: did you mean '<foo>'?
error: `test ` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:83:20
|
83 | #[get("/", data = "<test >")]
| ^^^^^^^
|
= help: parameter names must be valid identifiers
error: parameters must be named
--> $DIR/route-path-bad-syntax.rs:88:9
|
88 | #[get("/<_>")]
| ^^^
|
= help: use a name such as `_guard` or `_param`
error: parameter names cannot be empty
--> $DIR/route-path-bad-syntax.rs:93:9
|
93 | #[get("/<>")]
| ^^
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:96:9
|
96 | #[get("/<id><")]
| ^^^^^
|
= help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:99:9
|
99 | #[get("/<<<<id><")]
| ^^^^^^^^
|
= help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:102:9
|
102 | #[get("/<>name><")]
| ^^^^^^^^
|
= help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>'