Fix error message type inference in compile-fail/remote/wrong_de.rs

This commit is contained in:
David Tolnay 2018-04-21 11:21:13 -07:00
parent 6a8c39b2aa
commit 607966dcf7
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -735,7 +735,7 @@ fn deserialize_newtype_struct(type_path: &Tokens, params: &Parameters, field: &F
} }
}; };
let mut result = quote_spanned!(Span::call_site()=> #type_path(#value)); let mut result = quote_spanned!(Span::call_site()=> #type_path(__field0));
if params.has_getter { if params.has_getter {
let this = &params.this; let this = &params.this;
result = quote! { result = quote! {
@ -748,6 +748,7 @@ fn deserialize_newtype_struct(type_path: &Tokens, params: &Parameters, field: &F
fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error> fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
where __E: _serde::Deserializer<#delife> where __E: _serde::Deserializer<#delife>
{ {
let __field0 = #value;
_serde::export::Ok(#result) _serde::export::Ok(#result)
} }
} }