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

stm32: do not use private constructor #3931

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

hvraven
Copy link
Contributor

@hvraven hvraven commented Feb 28, 2025

I see compile errors using a recent git checkout of embassy with an stm32l431cb. Use the from_bits function instead.

error[E0603]: tuple struct constructor `Sloten` is private
    --> /usr/local/cargo/git/checkouts/embassy-9312dcb0ed774b29/17301c0/embassy-stm32/src/sai/mod.rs:939:36
     |
939  |                 w.set_sloten(vals::Sloten(config.slot_enable as u16));
     |                                    ^^^^^^ private tuple struct constructor
     |
    ::: /usr/local/cargo/git/checkouts/stm32-data-generated-cb34dad5f3150296/5ffbb82/stm32-metapac/src/chips/stm32l431cb/../../peripherals/sai_v2.rs:1523:23
     |
1523 |     pub struct Sloten(u16);
     |                       --- a constructor is private if any of the fields is private
     |
note: the tuple struct constructor `Sloten` is defined here
    --> /usr/local/cargo/git/checkouts/stm32-data-generated-cb34dad5f3150296/5ffbb82/stm32-metapac/src/chips/stm32l431cb/../../peripherals/sai_v2.rs:1523:5
     |
1523 |     pub struct Sloten(u16);
     |     ^^^^^^^^^^^^^^^^^

@lulf lulf added this pull request to the merge queue Mar 3, 2025
Merged via the queue into embassy-rs:main with commit 0edd45e Mar 3, 2025
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants