• Peter Goodspeed-Niklaus's avatar
    add delegated_subsystem! macro to ease delegating subsystems · 9e36cae7
    Peter Goodspeed-Niklaus authored
    Unfortunately, it doesn't work right:
    
    ```
    error[E0446]: private type `CandidateBackingJob` in public interface
       --> node/core/backing/src/lib.rs:775:1
        |
    86  | struct CandidateBackingJob {
        | - `CandidateBackingJob` declared as private
    ...
    775 | delegated_subsystem!(CandidateBackingJob as CandidateBackingSubsystem);
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
    ```
    
    I'm not sure precisely what's going wrong, here; I suspect the problem is
    the use of `$job as JobTrait>::RunArgs` and `::ToJob`; the failure would be
    that it's not reifying the types to verify that the actual types are public,
    but instead referring to them via `CandidateBackingJob`, which is in fact private;
    that privacy is the point.
    
    Going to see if I can generic my way out of this, but we may be headed for a
    quick revert here.
    9e36cae7