Rocket/core/codegen_next/tests/ui-fail/catch.stderr

75 lines
2.0 KiB
Plaintext
Raw Normal View History

error: expected `fn`
--> $DIR/catch.rs:6:1
|
6 | struct Catcher(String);
| ^^^^^^
|
= help: `#[catch]` can only be used on functions
error: expected `fn`
--> $DIR/catch.rs:11:7
|
11 | const CATCH: &str = "Catcher";
| ^^^^^
|
= help: `#[catch]` can only be used on functions
error: invalid value: expected unsigned integer literal
--> $DIR/catch.rs:15:9
|
15 | #[catch("404")] //~ ERROR expected unsigned integer literal
| ^^^^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: unexpected named parameter: expected bare literal
--> $DIR/catch.rs:19:9
|
19 | #[catch(code = "404")] //~ ERROR unexpected named parameter
| ^^^^^^^^^^^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: unexpected named parameter: expected bare literal
--> $DIR/catch.rs:23:9
|
23 | #[catch(code = 404)] //~ ERROR unexpected named parameter
| ^^^^^^^^^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: status must be in range [100, 599]
--> $DIR/catch.rs:27:9
|
27 | #[catch(99)] //~ ERROR in range [100, 599]
| ^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: status must be in range [100, 599]
--> $DIR/catch.rs:31:9
|
31 | #[catch(600)] //~ ERROR in range [100, 599]
| ^^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: unexpected attribute parameter: `message`
--> $DIR/catch.rs:35:14
|
35 | #[catch(400, message = "foo")] //~ ERROR unexpected attribute parameter: `message`
| ^^^^^^^^^^^^^^^
|
= help: `#[catch]` expects a single status integer, e.g.: #[catch(404)]
error: invalid number of arguments: must be zero or one
--> $DIR/catch.rs:40:7
|
40 | fn f3(_request: &Request, other: bool) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: catchers may optionally take an argument of type `&Request`
error: aborting due to 9 previous errors