You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
78: Modified the entry and exception macros to accept a closure. r=japaric a=sjroe
This allows:
```rust
entry!(|| {
let mut x = 1;
loop {
x = x + 1;
}
});
```
as well as allowing the original usage:
```rust
entry!(main);
fn main() -> ! {
let mut x = 1;
loop {
x = x + 1;
}
}
```
The same is true for exceptions:
```rust
exception!(*, |irqn: i16| {
panic!("Unhandled exception (IRQn = {})", irqn);
});
```
Co-authored-by: Stephen Roe <[email protected]>
0 commit comments