Skip to content

macro expansion broken on latest nightly (2024-06-13) #3078

Closed
@Usioumeo

Description

@Usioumeo

I am developing a RISCV project based on embassy and ch32-hal, I have update my machine and installed the latest nightly version. Unfortunately the embassy macro expansion seems to have broken, and the error is not that helpful.
Now i get this error:

error: item does not constrain `__embassy_main::Fut::{opaque#0}`, but has it in its signature
  --> src/bin/main.rs:59:1
   |
59 | #[embassy_executor::main(entry = "qingke_rt::entry")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this procedural macro expansion
   |
  ::: <.cargo path>/registry/src/index.crates.io-6f17d22bba15001f/embassy-executor-macros-0.4.1/src/lib.rs:58:1
   |
58 | pub fn task(args: TokenStream, item: TokenStream) -> TokenStream {
   | ---------------------------------------------------------------- in this expansion of `#[::embassy_executor::task]`
   |
   = note: consider moving the opaque type's declaration and defining uses into a separate module

I have tried to use the latest git version (not the latest published on crates.io), but the result doesn't change
Having glazed at the changelog here it seems they have worked on impl traits and opaque types... In the weekend I could have some time to check on the issue... Let me know

I have tried to use the latest git version (not the latest published on crates.io), the error changes, and adding

#![feature(impl_trait_in_assoc_type)]

to my project, and now it compiles just fine

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