Skip to content

Compiling (build) error with rustc 1.82.0 #27

@seungjin

Description

@seungjin

Getting a build error with cargo/rustc 1.82.0

error[E0107]: type alias takes 2 generic arguments but 1 generic argument was supplied
   --> src/lib.rs:119:22
    |
119 |     trigger_app: Arc<TriggerApp<CronTrigger>>,
    |                      ^^^^^^^^^^ ----------- supplied 1 generic argument
    |                      |
    |                      expected 2 generic arguments
    |
note: type alias defined here, with 2 generic parameters: `T`, `F`
   --> /var/home/seungjin/.cargo/git/checkouts/spin-91500438ac5656d2/e51d608/crates/trigger/src/lib.rs:14:10
    |
14  | pub type TriggerApp<T, F> = FactorsExecutorApp<F, <T as Trigger<F>>::InstanceState>;
    |          ^^^^^^^^^^ -  -
help: add missing generic argument
    |
119 |     trigger_app: Arc<TriggerApp<CronTrigger, F>>,
    |                                            +++

error[E0107]: missing generics for trait `Trigger`
  --> src/lib.rs:42:6
   |
42 | impl Trigger for CronTrigger {
   |      ^^^^^^^ expected 1 generic argument
   |
note: trait defined here, with 1 generic parameter: `F`
  --> /var/home/seungjin/.cargo/git/checkouts/spin-91500438ac5656d2/e51d608/crates/trigger/src/lib.rs:30:11
   |
30 | pub trait Trigger<F: RuntimeFactors>: Sized + Send {
   |           ^^^^^^^ -
help: add missing generic argument
   |
42 | impl Trigger<F> for CronTrigger {
   |             +++

error[E0107]: type alias takes 2 generic arguments but 1 generic argument was supplied
  --> src/lib.rs:63:22
   |
63 |         trigger_app: TriggerApp<Self>,
   |                      ^^^^^^^^^^ ---- supplied 1 generic argument
   |                      |
   |                      expected 2 generic arguments
   |
note: type alias defined here, with 2 generic parameters: `T`, `F`
  --> /var/home/seungjin/.cargo/git/checkouts/spin-91500438ac5656d2/e51d608/crates/trigger/src/lib.rs:14:10
   |
14 | pub type TriggerApp<T, F> = FactorsExecutorApp<F, <T as Trigger<F>>::InstanceState>;
   |          ^^^^^^^^^^ -  -
help: add missing generic argument
   |
63 |         trigger_app: TriggerApp<Self, F>,
   |                                     +++

error[E0107]: type alias takes 2 generic arguments but 1 generic argument was supplied
  --> src/lib.rs:72:21
   |
72 |         engine: Arc<TriggerApp<Self>>,
   |                     ^^^^^^^^^^ ---- supplied 1 generic argument
   |                     |
   |                     expected 2 generic arguments
   |
note: type alias defined here, with 2 generic parameters: `T`, `F`
  --> /var/home/seungjin/.cargo/git/checkouts/spin-91500438ac5656d2/e51d608/crates/trigger/src/lib.rs:14:10
   |
14 | pub type TriggerApp<T, F> = FactorsExecutorApp<F, <T as Trigger<F>>::InstanceState>;
   |          ^^^^^^^^^^ -  -
help: add missing generic argument
   |
72 |         engine: Arc<TriggerApp<Self, F>>,
   |                                    +++

error[E0107]: type alias takes 2 generic arguments but 1 generic argument was supplied
   --> src/lib.rs:124:29
    |
124 |     fn new(trigger_app: Arc<TriggerApp<CronTrigger>>, component: Component) -> Self {
    |                             ^^^^^^^^^^ ----------- supplied 1 generic argument
    |                             |
    |                             expected 2 generic arguments
    |
note: type alias defined here, with 2 generic parameters: `T`, `F`
   --> /var/home/seungjin/.cargo/git/checkouts/spin-91500438ac5656d2/e51d608/crates/trigger/src/lib.rs:14:10
    |
14  | pub type TriggerApp<T, F> = FactorsExecutorApp<F, <T as Trigger<F>>::InstanceState>;
    |          ^^^^^^^^^^ -  -
help: add missing generic argument
    |
124 |     fn new(trigger_app: Arc<TriggerApp<CronTrigger, F>>, component: Component) -> Self {
    |                                                   +++

error[E0599]: no associated item named `TYPE` found for struct `CronTrigger` in the current scope
  --> src/lib.rs:51:57
   |
19 | pub struct CronTrigger {
   | ---------------------- associated item `TYPE` not found for this struct
...
51 |             .trigger_configs::<CronTriggerConfig>(Self::TYPE)?
   |                                                         ^^^^ associated item not found in `CronTrigger`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `TYPE`, perhaps you need to implement it:
           candidate #1: `Trigger`

Some errors have detailed explanations: E0107, E0599.
For more information about an error, try `rustc --explain E0107`.
error: could not compile `trigger-cron` (lib) due to 6 previous errors
seungjin@toolbx ~/W/r/spin-trigger-cron (main) [101]> rustup show
Default host: x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions