Closed
Description
Bevy version
[Optional] Relevant system information
Rust 1.86.0, 2024 edition.
What you did
fn test() {
let mut app = App::new();
app.add_observer(|_: Trigger<TestEvent>| {
panic!();
});
}
#[derive(Event)]
struct TestEvent;
What went wrong
The code no longer compiles, though it worked in Bevy 0.15.0 (which used the 2021 edition).
It also compiles when I explicitly specify the return type ()
:
fn test() {
let mut app = App::new();
app.add_observer(|_: Trigger<TestEvent>| -> () {
panic!();
});
}
#[derive(Event)]
struct TestEvent;