2018-09-16 07:33:16 +00:00
|
|
|
error: expected `fn`
|
|
|
|
--> $DIR/catch.rs:6:1
|
|
|
|
|
|
|
|
|
6 | struct Catcher(String);
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` can only be used on functions
|
|
|
|
|
|
|
|
error: expected `fn`
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:9:7
|
|
|
|
|
|
|
|
|
9 | const CATCH: &str = "Catcher";
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` can only be used on functions
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
error: expected integer or identifier, found string literal
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:11:9
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
11 | #[catch("404")]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2018-10-04 10:54:46 +00:00
|
|
|
error: unexpected keyed parameter: expected literal or identifier
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:14:9
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
14 | #[catch(code = "404")]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2018-10-04 10:54:46 +00:00
|
|
|
error: unexpected keyed parameter: expected literal or identifier
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:17:9
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
17 | #[catch(code = 404)]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
|
|
error: status must be in range [100, 599]
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:20:9
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
20 | #[catch(99)]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
|
|
error: status must be in range [100, 599]
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:23:9
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
23 | #[catch(600)]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
|
|
error: unexpected attribute parameter: `message`
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:26:14
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
26 | #[catch(400, message = "foo")]
|
2018-09-16 07:33:16 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/catch.rs:30:17
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
30 | fn f3(_request: &Request, other: bool) { }
|
2020-07-30 06:07:22 +00:00
|
|
|
| ^^^^^^^^ expected `&rocket::Request<'_>`, found struct `rocket::http::Status`
|
2018-09-16 07:33:16 +00:00
|
|
|
|
2020-07-30 06:07:22 +00:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/catch.rs:30:34
|
|
|
|
|
|
|
|
|
30 | fn f3(_request: &Request, other: bool) { }
|
|
|
|
| ^^^^ expected `bool`, found `&rocket::Request<'_>`
|