@@ -4,6 +4,7 @@ use rustc_ast::tokenstream::TokenStream;
44use rustc_errors:: ErrorGuaranteed ;
55use rustc_middle:: ty;
66use rustc_parse:: parser:: { ForceCollect , Parser } ;
7+ use rustc_session:: Session ;
78use rustc_session:: config:: ProcMacroExecutionStrategy ;
89use rustc_span:: Span ;
910use rustc_span:: profiling:: SpannedEventArgRecorder ;
@@ -32,9 +33,9 @@ impl<T> pm::bridge::server::MessagePipe<T> for MessagePipe<T> {
3233 }
3334}
3435
35- pub fn exec_strategy ( ecx : & ExtCtxt < ' _ > ) -> impl pm:: bridge:: server:: ExecutionStrategy {
36+ pub fn exec_strategy ( sess : & Session ) -> impl pm:: bridge:: server:: ExecutionStrategy {
3637 pm:: bridge:: server:: MaybeCrossThread :: < MessagePipe < _ > > :: new (
37- ecx . sess . opts . unstable_opts . proc_macro_execution_strategy
38+ sess. opts . unstable_opts . proc_macro_execution_strategy
3839 == ProcMacroExecutionStrategy :: CrossThread ,
3940 )
4041}
@@ -56,7 +57,7 @@ impl base::BangProcMacro for BangProcMacro {
5657 } ) ;
5758
5859 let proc_macro_backtrace = ecx. ecfg . proc_macro_backtrace ;
59- let strategy = exec_strategy ( ecx) ;
60+ let strategy = exec_strategy ( ecx. sess ) ;
6061 let server = proc_macro_server:: Rustc :: new ( ecx) ;
6162 self . client . run ( & strategy, server, input, proc_macro_backtrace) . map_err ( |e| {
6263 ecx. dcx ( ) . emit_err ( errors:: ProcMacroPanicked {
@@ -87,7 +88,7 @@ impl base::AttrProcMacro for AttrProcMacro {
8788 } ) ;
8889
8990 let proc_macro_backtrace = ecx. ecfg . proc_macro_backtrace ;
90- let strategy = exec_strategy ( ecx) ;
91+ let strategy = exec_strategy ( ecx. sess ) ;
9192 let server = proc_macro_server:: Rustc :: new ( ecx) ;
9293 self . client . run ( & strategy, server, annotation, annotated, proc_macro_backtrace) . map_err (
9394 |e| {
0 commit comments