Skip to content

Commit

Permalink
add missing .stderr files
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-gt committed Apr 3, 2024
1 parent 106985b commit 1f58c45
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/macro/empty_attr.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: Cannot parse attribute as list
--> tests/macro/empty_attr.rs:6:3
|
6 | #[endpoint]
| ^^^^^^^^

error: Attribute cannot be empty
--> tests/macro/empty_attr.rs:10:3
|
10 | #[endpoint()]
| ^^^^^^^^

warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/empty_attr.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
40 changes: 40 additions & 0 deletions tests/macro/invalid_data.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
error: May only mark one field as raw
--> tests/macro/invalid_data.rs:19:5
|
19 | #[endpoint(raw)]
| ^

warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/invalid_data.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default

error[E0308]: mismatched types
--> tests/macro/invalid_data.rs:5:17
|
5 | #[derive(Debug, Endpoint, Serialize)]
| ^^^^^^^^
| |
| expected `Vec<u8>`, found `String`
| arguments to this enum variant are incorrect
|
= note: expected struct `Vec<u8>`
found struct `std::string::String`
help: the type constructed contains `std::string::String` due to the type of the argument passed
--> tests/macro/invalid_data.rs:5:17
|
5 | #[derive(Debug, Endpoint, Serialize)]
| ^^^^^^^^ this argument influences the type of `Some`
note: tuple variant defined here
--> $RUST/core/src/option.rs
|
| Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
= note: this error originates in the derive macro `Endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)
help: call `Into::into` on this expression to convert `std::string::String` into `Vec<u8>`
|
5 | #[derive(Debug, Endpoint.into(), Serialize)]
| +++++++
13 changes: 13 additions & 0 deletions tests/macro/invalid_method.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/invalid_method.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default

error[E0599]: no variant or associated item named `TEST` found for enum `RequestMethod` in the current scope
--> tests/macro/invalid_method.rs:6:41
|
6 | #[endpoint(path = "test/path", method = "TEST")]
| ^^^^^^ variant or associated item not found in `RequestMethod`
13 changes: 13 additions & 0 deletions tests/macro/invalid_result.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: Unknown parameter
--> tests/macro/invalid_result.rs:6:32
|
6 | #[endpoint(path = "test/path", result = "DoesNotExist")]
| ^^^^^^

warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/invalid_result.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
19 changes: 19 additions & 0 deletions tests/macro/invalid_type.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/invalid_type.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default

error[E0599]: no variant or associated item named `BAD` found for enum `RequestType` in the current scope
--> tests/macro/invalid_type.rs:6:47
|
6 | #[endpoint(path = "test/path", request_type = "BAD", response_type = "BAD")]
| ^^^^^ variant or associated item not found in `RequestType`

error[E0599]: no variant or associated item named `BAD` found for enum `ResponseType` in the current scope
--> tests/macro/invalid_type.rs:6:70
|
6 | #[endpoint(path = "test/path", request_type = "BAD", response_type = "BAD")]
| ^^^^^ variant or associated item not found in `ResponseType`
15 changes: 15 additions & 0 deletions tests/macro/no_attr.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error: Deriving `Endpoint` requires attaching an `endpoint` attribute
--> tests/macro/no_attr.rs:5:17
|
5 | #[derive(Debug, Endpoint, Serialize)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `Endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/no_attr.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
15 changes: 15 additions & 0 deletions tests/macro/no_path.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error: Missing required parameter: path
--> tests/macro/no_path.rs:5:17
|
5 | #[derive(Debug, Endpoint, Serialize)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `Endpoint` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused import: `rustify::endpoint::Endpoint`
--> tests/macro/no_path.rs:1:5
|
1 | use rustify::endpoint::Endpoint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default

0 comments on commit 1f58c45

Please sign in to comment.