diff options
Diffstat (limited to 'compiler/rustc_expand/src/proc_macro.rs')
| -rw-r--r-- | compiler/rustc_expand/src/proc_macro.rs | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs index 36707a1ae27..e8e098b6212 100644 --- a/compiler/rustc_expand/src/proc_macro.rs +++ b/compiler/rustc_expand/src/proc_macro.rs @@ -3,7 +3,7 @@ use crate::proc_macro_server; use rustc_ast::ptr::P; use rustc_ast::token; -use rustc_ast::tokenstream::{TokenStream, TokenTree}; +use rustc_ast::tokenstream::{CanSynthesizeMissingTokens, TokenStream, TokenTree}; use rustc_ast::{self as ast, *}; use rustc_data_structures::sync::Lrc; use rustc_errors::{struct_span_err, Applicability, ErrorReported}; @@ -94,7 +94,12 @@ impl MultiItemModifier for ProcMacroDerive { let input = if item.pretty_printing_compatibility_hack() { TokenTree::token(token::Interpolated(Lrc::new(item)), DUMMY_SP).into() } else { - nt_to_tokenstream(&item, &ecx.sess.parse_sess, DUMMY_SP) + nt_to_tokenstream( + &item, + &ecx.sess.parse_sess, + DUMMY_SP, + CanSynthesizeMissingTokens::Yes, + ) }; let server = proc_macro_server::Rustc::new(ecx); | 
