Adjust '#[catch]' codegen output to fix a UI test regression in latest nightly.

This commit is contained in:
Jeb Rosen 2019-09-21 08:32:59 -07:00 committed by Sergio Benitez
parent c40276e8d2
commit b29b2db35e
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ pub fn _catch(args: TokenStream, input: TokenStream) -> Result<TokenStream> {
let catcher_response = quote_spanned!(return_type_span => { let catcher_response = quote_spanned!(return_type_span => {
// Emit this to force a type signature check. // Emit this to force a type signature check.
let #catcher: #fn_sig = #user_catcher_fn_name; 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. // Generate the catcher, keeping the user's input around.