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
|
|
|
|
|
|
|
error: invalid value: expected unsigned integer 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
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
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
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
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
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
|
|
|
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
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
|
|
|
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
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
|
|
|
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
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
|
|
|
|
|
|
|
|
error: invalid number of arguments: must be zero or one
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/catch.rs:30:6
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
30 | fn f3(_request: &Request, other: bool) { }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-09-16 07:33:16 +00:00
|
|
|
|
|
|
|
|
= help: catchers may optionally take an argument of type `&Request`
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
warning: unused import: `rocket::Request`
|
|
|
|
--> $DIR/catch.rs:3:5
|
|
|
|
|
|
|
|
|
3 | use rocket::Request;
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `#[warn(unused_imports)]` on by default
|