diff options
| author | Josh Driver <keeperofdakeys@gmail.com> | 2016-12-31 16:02:06 +1030 |
|---|---|---|
| committer | Josh Driver <keeperofdakeys@gmail.com> | 2016-12-31 17:19:23 +1030 |
| commit | 22f788c64417523e838bf367c83f8a426102809a (patch) | |
| tree | 108a720e81508d25a77606c0ed9118cbb1bebc0e /src/libsyntax_ext | |
| parent | 6c9bb42ecc48ffb5a3c8b61e220b11adc3a46384 (diff) | |
| download | rust-22f788c64417523e838bf367c83f8a426102809a.tar.gz rust-22f788c64417523e838bf367c83f8a426102809a.zip | |
Stop macro calls in structs for proc_macro_derive from panicing
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/custom.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax_ext/deriving/custom.rs b/src/libsyntax_ext/deriving/custom.rs index 6f02a348f91..811aea4a9eb 100644 --- a/src/libsyntax_ext/deriving/custom.rs +++ b/src/libsyntax_ext/deriving/custom.rs @@ -12,7 +12,7 @@ use std::panic; use errors::FatalError; use proc_macro::{TokenStream, __internal}; -use syntax::ast::{self, ItemKind, Attribute}; +use syntax::ast::{self, ItemKind, Attribute, Mac}; use syntax::attr::{mark_used, mark_known}; use syntax::codemap::Span; use syntax::ext::base::*; @@ -28,6 +28,9 @@ impl<'a> Visitor<'a> for MarkAttrs<'a> { mark_known(attr); } } + + fn visit_mac(&mut self, _mac: &Mac) { + } } pub struct CustomDerive { |
