Skip to content

no method named _ found for reference &Waker in the current scopeΒ #3450

Closed
@rowanfr

Description

@rowanfr

When trying to compile using dependency embassy-executor = { version = "0.6.1", features = ["nightly", "integrated-timers"] } on the esp toolchain installed by espup I get compiler error:

error[E0599]: no method named `vtable` found for reference `&Waker` in the current scope
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embassy-executor-0.6.1/src/raw/waker.rs:53:20
   |
53 |             (waker.vtable(), waker.data())
   |                    ^^^^^^ method not found in `&Waker`

error[E0599]: no method named `data` found for reference `&Waker` in the current scope
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/embassy-executor-0.6.1/src/raw/waker.rs:53:36
   |
53 |             (waker.vtable(), waker.data())
   |                                    ^^^^ method not found in `&Waker`

This is due to my toolchain being esp which is considered nightly and the current accessors not being available for type Waker. The relevant code snippets are:

#[cfg(feature = "nightly")]
{
(waker.vtable(), waker.data())
}

pub struct Waker {
    waker: RawWaker,
}
pub struct RawWaker {
    /// A data pointer, which can be used to store arbitrary data as required
    /// by the executor. This could be e.g. a type-erased pointer to an `Arc`
    /// that is associated with the task.
    /// The value of this field gets passed to all functions that are part of
    /// the vtable as the first parameter.
    data: *const (),
    /// Virtual function pointer table that customizes the behavior of this waker.
    vtable: &'static RawWakerVTable,
}

I presume that this section in the executor should be altered to use RawWaker but there is a chance that the esp toolchain is at fault and nothing needs to be done in this code base. I will look further into this but I'm not familiar with Waker.

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