mirror of
https://github.com/dtolnay/thiserror.git
synced 2025-04-06 06:17:39 +03:00
Handle enum containing #[source] #[backtrace] field
This commit is contained in:
parent
ed396c2074
commit
2b37b9ed62
1 changed files with 1 additions and 1 deletions
|
@ -243,7 +243,7 @@ fn impl_enum(input: Enum) -> TokenStream {
|
|||
}
|
||||
(Some(backtrace_field), _) => {
|
||||
let backtrace = &backtrace_field.member;
|
||||
if variant.from_field().map_or(false, |f| f.member == *backtrace) {
|
||||
if variant.source_field().map_or(false, |f| f.member == *backtrace) {
|
||||
let varsource = quote!(source);
|
||||
let source_backtrace = quote_spanned! {backtrace.span()=>
|
||||
#varsource.as_dyn_error().backtrace()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue