@@ -144,10 +144,10 @@ where
144144#[macro_export]
145145macro_rules! run {
146146 ($args:expr, $callback_fn:ident) => {
147- run_driver!($args, || $callback_fn())
147+ $crate:: run_driver!($args, || $callback_fn())
148148 };
149149 ($args:expr, $callback:expr) => {
150- run_driver!($args, $callback)
150+ $crate:: run_driver!($args, $callback)
151151 };
152152}
153153
@@ -158,10 +158,10 @@ macro_rules! run {
158158#[macro_export]
159159macro_rules! run_with_tcx {
160160 ($args:expr, $callback_fn:ident) => {
161- run_driver!($args, |tcx| $callback_fn(tcx), with_tcx)
161+ $crate:: run_driver!($args, |tcx| $callback_fn(tcx), with_tcx)
162162 };
163163 ($args:expr, $callback:expr) => {
164- run_driver!($args, $callback, with_tcx)
164+ $crate:: run_driver!($args, $callback, with_tcx)
165165 };
166166}
167167
@@ -191,11 +191,11 @@ macro_rules! run_driver {
191191 use rustc_public::CompilerError;
192192 use std::ops::ControlFlow;
193193
194- pub struct StableMir<B = (), C = (), F = fn($(optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C>>
194+ pub struct StableMir<B = (), C = (), F = fn($($crate:: optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C>>
195195 where
196196 B: Send,
197197 C: Send,
198- F: FnOnce($(optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
198+ F: FnOnce($($crate:: optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
199199 {
200200 callback: Option<F>,
201201 result: Option<ControlFlow<B, C>>,
@@ -205,7 +205,7 @@ macro_rules! run_driver {
205205 where
206206 B: Send,
207207 C: Send,
208- F: FnOnce($(optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
208+ F: FnOnce($($crate:: optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
209209 {
210210 /// Creates a new `StableMir` instance, with given test_function and arguments.
211211 pub fn new(callback: F) -> Self {
@@ -240,7 +240,7 @@ macro_rules! run_driver {
240240 where
241241 B: Send,
242242 C: Send,
243- F: FnOnce($(optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
243+ F: FnOnce($($crate:: optional!($with_tcx TyCtxt))?) -> ControlFlow<B, C> + Send,
244244 {
245245 /// Called after analysis. Return value instructs the compiler whether to
246246 /// continue the compilation afterwards (defaults to `Compilation::Continue`)
@@ -251,7 +251,7 @@ macro_rules! run_driver {
251251 ) -> Compilation {
252252 if let Some(callback) = self.callback.take() {
253253 rustc_internal::run(tcx, || {
254- self.result = Some(callback($(optional!($with_tcx tcx))?));
254+ self.result = Some(callback($($crate:: optional!($with_tcx tcx))?));
255255 })
256256 .unwrap();
257257 if self.result.as_ref().is_some_and(|val| val.is_continue()) {
0 commit comments