3 ms·
Can the inconvenience be mostly dissolved by a proc macro though? Leveraging the type system scales better than ad hoc lints. Maybe later we need to keep track
by tialaramex 4y ago
Can the inconvenience be mostly dissolved by a proc macro though?
Leveraging the type system scales better than ad hoc lints. Maybe later we need to keep track of several tokens, Rust has no problem making a Vec<CanSleep> and will optimise that exactly the way you expect (it's just a counter, the CanSleeps don't need storing anywhere) likewise a [Option<CanSleep>; 4] is just four bytes to track whether each element is None or Some(CanSleep).