Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Generated template not building (opaque type declaration) #2

Closed
KenjutsuGH opened this issue Jun 19, 2024 · 3 comments
Closed

Comments

@KenjutsuGH
Copy link

Hi,

I ran

cargo generate ch32-rs/ch32-hal-template

and went through the prompts to create a project for a ch32v203f6p6.:

cargo generate ch32-rs/ch32-hal-template 
⚠️   Favorite `ch32-rs/ch32-hal-template` not found in config, using it as a git repository: https://github.com/ch32-rs/ch32-hal-template.git
🤷   Project Name: v203blink
🔧   Destination: /Users/pkruger/Downloads/ch32-rs/v203blink ...
🔧   project-name: v203blink ...
🔧   Generating template ...
✔ 🤷   Which MCU family to target? · ch32v203
✔ 🤷   Which ch32v203 variant to use? · ch32v203f6p6
🔧   Moving generated files into: `/Users/ZZZ/Downloads/ch32-rs/v203blink`...
🔧   Initializing a fresh Git repository
✨   Done! New project created /Users/ZZZ/Downloads/ch32-rs/v203blink

I then build the project, and get the following errors:

cargo build --release
   Compiling v203blink v0.1.0 (/Users/pkruger/Downloads/ch32-rs/v203blink)
error: item does not constrain `blink::Fut::{opaque#0}`, but has it in its signature
  --> src/main.rs:11:1
   |
11 | #[embassy_executor::task]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: consider moving the opaque type's declaration and defining uses into a separate module
note: this opaque type is in the signature
  --> src/main.rs:11:1
   |
11 | #[embassy_executor::task]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the attribute macro `embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info)

error: item does not constrain `__embassy_main::Fut::{opaque#0}`, but has it in its signature
  --> src/main.rs:23:1
   |
23 | #[embassy_executor::main(entry = "qingke_rt::entry")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: consider moving the opaque type's declaration and defining uses into a separate module
note: this opaque type is in the signature
  --> src/main.rs:23:1
   |
23 | #[embassy_executor::main(entry = "qingke_rt::entry")]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the attribute macro `::embassy_executor::task` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `v203blink` (bin "v203blink") due to 2 previous errors

I am new to rust so I am at a total loss on what is wrong and how to resolve it.

My setup:

  • macos Sonoma 14.5
  • cargo -V: cargo 1.81.0-nightly (a1f47ec3f 2024-06-15)
  • rustc -V: rustc 1.81.0-nightly (8fcd4dd08 2024-06-18)
@KenjutsuGH KenjutsuGH changed the title macOS: Generated template not building macOS: Generated template not building (opaque type declaration) Jun 19, 2024
@romainreignier
Copy link
Contributor

Thanks for your report.
This error is not MacOS specific.
On Linux, I was on Nightly 1.79 and it was building, but after an update to 1.81, I now have the same error.
This is a ch32-hal error that should be reported there.

@romainreignier
Copy link
Contributor

This is actually already reported: ch32-rs/ch32-hal#29

@romainreignier
Copy link
Contributor

This should be fixed by using a fixed version of the nightly toolchain.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants