You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating the Rust compiler used for trybuild to 1.78 added this weird suggestion to wrap a string in a closure:
error[E0631]: type mismatch in function arguments
--> tests/ui/endpoint/dynamic_schema_wrong_type.rs:16:21
|
8 | fn schema(_: u16) -> String {
| --------------------------- found signature defined here
...
16 | #[read_all(schema = "schema", status_codes = "status_codes")]
| ^^^^^^^^ expected due to this
|
= note: expected function signature `fn(StatusCode) -> _`
found function signature `fn(u16) -> _`
= note: required for `fn(u16) -> std::string::String {schema}` to implement `CustomSchema`
help: consider wrapping the function in a closure
|
16 | #[read_all(schema = |arg0: StatusCode| "schema"(/* u16 */), status_codes = "status_codes")]
| ++++++++++++++++++ +++++++++++
error[E0271]: expected `status_codes` to be a fn item that returns `Vec<StatusCode>`, but it returns `Vec<u16>`
--> tests/ui/endpoint/dynamic_schema_wrong_type.rs:16:46
|
16 | #[read_all(schema = "schema", status_codes = "status_codes")]
| ^^^^^^^^^^^^^^ expected `Vec<StatusCode>`, found `Vec<u16>`
|
= note: expected struct `Vec<StatusCode>`
found struct `Vec<u16>`
= note: required for `fn() -> Vec<u16> {status_codes}` to implement `CustomStatusCodes`
The text was updated successfully, but these errors were encountered:
Updating the Rust compiler used for trybuild to 1.78 added this weird suggestion to wrap a string in a closure:
The text was updated successfully, but these errors were encountered: