@@ -403,14 +403,15 @@ pub struct CompileController<'a> {
403
403
404
404
/// Allows overriding default rustc query providers,
405
405
/// after `default_provide` has installed them.
406
- pub provide : Box < dyn Fn ( & mut ty:: query:: Providers ) + ' a > ,
406
+ pub provide : Box < dyn Fn ( & mut ty:: query:: Providers ) + ' a + sync :: Send > ,
407
407
/// Same as `provide`, but only for non-local crates,
408
408
/// applied after `default_provide_extern`.
409
- pub provide_extern : Box < dyn Fn ( & mut ty:: query:: Providers ) + ' a > ,
409
+ pub provide_extern : Box < dyn Fn ( & mut ty:: query:: Providers ) + ' a + sync :: Send > ,
410
410
}
411
411
412
412
impl < ' a > CompileController < ' a > {
413
413
pub fn basic ( ) -> CompileController < ' a > {
414
+ sync:: assert_send :: < Self > ( ) ;
414
415
CompileController {
415
416
after_parse : PhaseController :: basic ( ) ,
416
417
after_expand : PhaseController :: basic ( ) ,
@@ -500,7 +501,7 @@ pub struct PhaseController<'a> {
500
501
// If true then the compiler will try to run the callback even if the phase
501
502
// ends with an error. Note that this is not always possible.
502
503
pub run_callback_on_error : bool ,
503
- pub callback : Box < dyn Fn ( & mut CompileState ) + ' a > ,
504
+ pub callback : Box < dyn Fn ( & mut CompileState ) + ' a + sync :: Send > ,
504
505
}
505
506
506
507
impl < ' a > PhaseController < ' a > {
0 commit comments