agbrs / agb

Library for writing Game Boy Advance games in Rust
https://agbrs.dev/
Mozilla Public License 2.0
320 stars 27 forks source link

Build Issues #753

Closed b-10e closed 3 months ago

b-10e commented 3 months ago

I recently updated my project from 0.19.1 to 0.20.5, and I did update the rustflags in config.toml that were mentioned in the 0.20.0 release notes. I am on the latest nightly rust release. However, when I try to build my project, the only error I get is this:

   --> /home/<user>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/agb-0.20.5/src/interrupt.rs:183:40
    |
183 |                 unsafe { Box::from_raw(this.closure as *mut dyn Fn(&CriticalSection)) };
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `CriticalSection<'_>`, found `&CriticalSection<'_>`
    |
    = note: expected trait object `dyn for<'a> Fn(CriticalSection<'a>)`
               found trait object `dyn for<'a, 'b> Fn(&'a CriticalSection<'b>)`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `agb` (lib) due to 1 previous error

and no other information. Is this something I am doing wrong, or an issue with the agb crate?

corwinkuiper commented 3 months ago

This used to compile but stopped working on the 10th of July, see https://github.com/agbrs/agb/actions/runs/9869294519/job/27252767764. There's not been a release since then with the fix, so at the moment an older nightly or to use the current master branch would be the way to go.

b-10e commented 3 months ago

Alright, thank you.