Skip to content

Commit

Permalink
Handle enum containing #[source] #[backtrace] field
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 28, 2021
1 parent ed396c2 commit 2b37b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2b37b9e

Please sign in to comment.