mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
chore: update nightly error output for server function return types
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/empty_return.rs:3:1
|
||||
|
|
||||
3 | #[server]
|
||||
| ^^^^^^^^^ Must return a `Result` or aliased `Result`.
|
||||
|
|
||||
= help: the trait `ServerFnMustReturnResult` is not implemented for `()`
|
||||
= note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
|
||||
= help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
|
||||
= note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/empty_return.rs:3:1
|
||||
|
|
||||
@@ -16,22 +27,11 @@ error[E0271]: expected `impl Future<Output = ()>` to be a future that resolves t
|
||||
|
|
||||
= note: expected enum `Result<_, _>`
|
||||
found unit type `()`
|
||||
note: required by a bound in `ServerFn::{anon_assoc#0}`
|
||||
note: required by a bound in `ServerFn::run_body::{anon_assoc#0}`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::{anon_assoc#0}`
|
||||
|
||||
error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/empty_return.rs:3:1
|
||||
|
|
||||
3 | #[server]
|
||||
| ^^^^^^^^^ Must return a `Result` or aliased `Result`.
|
||||
|
|
||||
= help: the trait `ServerFnMustReturnResult` is not implemented for `()`
|
||||
= note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
|
||||
= help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
|
||||
= note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::run_body::{anon_assoc#0}`
|
||||
|
||||
error[E0277]: () is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/empty_return.rs:3:1
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/not_result.rs:25:1
|
||||
|
|
||||
25 | #[server]
|
||||
| ^^^^^^^^^ Must return a `Result` or aliased `Result`.
|
||||
|
|
||||
= help: the trait `ServerFnMustReturnResult` is not implemented for `CustomError`
|
||||
= note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
|
||||
= help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
|
||||
= note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/not_result.rs:25:1
|
||||
|
|
||||
@@ -16,22 +27,11 @@ error[E0271]: expected `impl Future<Output = CustomError>` to be a future that r
|
||||
|
|
||||
= note: expected enum `Result<_, _>`
|
||||
found enum `CustomError`
|
||||
note: required by a bound in `ServerFn::{anon_assoc#0}`
|
||||
note: required by a bound in `ServerFn::run_body::{anon_assoc#0}`
|
||||
--> src/lib.rs
|
||||
|
|
||||
| ) -> impl Future<Output = Result<Self::Output, Self::Error>> + Send;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::{anon_assoc#0}`
|
||||
|
||||
error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/not_result.rs:25:1
|
||||
|
|
||||
25 | #[server]
|
||||
| ^^^^^^^^^ Must return a `Result` or aliased `Result`.
|
||||
|
|
||||
= help: the trait `ServerFnMustReturnResult` is not implemented for `CustomError`
|
||||
= note: If you are trying to return an alias of `Result`, you must also implement `FromServerFnError` for the error type.
|
||||
= help: the trait `ServerFnMustReturnResult` is implemented for `Result<T, E>`
|
||||
= note: this error originates in the attribute macro `server` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ServerFn::run_body::{anon_assoc#0}`
|
||||
|
||||
error[E0277]: CustomError is not a `Result` or aliased `Result`. Server functions must return a `Result` or aliased `Result`.
|
||||
--> tests/invalid/not_result.rs:25:1
|
||||
|
||||
Reference in New Issue
Block a user