this post was submitted on 13 Mar 2024
10 points (100.0% liked)
Rust
6117 readers
10 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A hack would be to do a simple noop read, like:
The problem seems to be the last
last = last_mut.cdr;
, since you don't use it on the last iteration.I'd personally do that with a comment until you (or someone else) can fix it, perhaps with a linter instruction at some point. That noop code should be eliminated during the optimization step, so it shouldn't hurt performance or anything.
Edit: don't do this, just prefix the variable with an underscore as someone else mentioned.