Re:Rust, Lifetimes, and Collections
by masklinn on Wednesday November 19, 2014 @04:01PM
(#8632594)
> Thanks. I don't see a call to test::black_box(x), so I assume that was an empty function optimized out.
black_box is and does nothing, its purpose is to be opaque to the optimiser and make values it is passed "used" for optimiser purposes, otherwise the optimiser would remove the whole thing since it's a noop.
black_box is and does nothing, its purpose is to be opaque to the optimiser and make values it is passed "used" for optimiser purposes, otherwise the optimiser would remove the whole thing since it's a noop.