Explain this line of Rust code (what is +?):
pub struct BlinkAlloc<A: Allocator = +Global> {
>Solution :
I think you are looking at this:
pub struct BlinkAlloc<A: Allocator = +Global> {
arena: ArenaLocal,
allocator: A,
}
This is not valid Rust syntax… usually. But this struct definition is actually inside a macro call.
This crate uses a complex system of macros, which I didn’t spend the time to understand. It also doesn’t document the supported syntax, so I would only be guessing if I gave any interpretation for what it actually means.