diff --git a/server_fn/src/error.rs b/server_fn/src/error.rs index e8d7a22dd..f7d878bbd 100644 --- a/server_fn/src/error.rs +++ b/server_fn/src/error.rs @@ -560,13 +560,16 @@ where } #[doc(hidden)] -#[rustversion::attr(since(1.78), diagnostic::on_unimplemented( - message = "{Self} is not a `Result` or aliased `Result`. Server functions \ - must return a `Result` or aliased `Result`.", - label = "Must return a `Result` or aliased `Result`.", - note = "If you are trying to return an alias of `Result`, you must also \ - implement `FromServerFnError` for the error type." -))] +#[rustversion::attr( + since(1.78), + diagnostic::on_unimplemented( + message = "{Self} is not a `Result` or aliased `Result`. Server \ + functions must return a `Result` or aliased `Result`.", + label = "Must return a `Result` or aliased `Result`.", + note = "If you are trying to return an alias of `Result`, you must \ + also implement `FromServerFnError` for the error type." + ) +)] /// A trait for extracting the error and ok types from a [`Result`]. This is used to allow alias types to be returned from server functions. pub trait ServerFnMustReturnResult { /// The error type of the [`Result`].