diff --git a/core/codegen/src/attribute/catch.rs b/core/codegen/src/attribute/catch.rs index 05bdfb94..dd8daaaa 100644 --- a/core/codegen/src/attribute/catch.rs +++ b/core/codegen/src/attribute/catch.rs @@ -74,7 +74,8 @@ pub fn _catch(args: TokenStream, input: TokenStream) -> Result { let catcher_response = quote_spanned!(return_type_span => { // Emit this to force a type signature check. let #catcher: #fn_sig = #user_catcher_fn_name; - ::rocket::response::Responder::respond_to(#catcher(#inputs), #req)? + let ___responder = #catcher(#inputs); + ::rocket::response::Responder::respond_to(___responder, #req)? }); // Generate the catcher, keeping the user's input around.