Search
Items tagged with: Rust
My opening gambit today at #NDCTechTown 2024, mostly to a C++ audience. I hope I come out alive 😄
Just kidding; they know me, don't send any help.
#Rust #cpp #cplusplus #rustlang
Stop Over-optimizing your Rust
Just cause Rust _lets_ you optimize your code, it doesn't mean you _should_!
Clone things if it makes your life easier! You can always come back and optimize it later if it turns out to matter. I’ve found that often what I thought was important to optimize up front was the wrong thing to focus on.
You can now #[expect] lints in the new Rust stable! 🦀
✨ Suppresses lints and warns on unfulfilled expectations.
📚 Documentation: https://doc.rust-lang.org/rustc/lints/levels.html#expect
➡️ Implementation: https://github.com/rust-lang/rust/pull/120924/
#rustlang #rust #programming #language #lint #warn #trick #coding #rustacean #devtips
Let's `#[expect]` some lints: Stabilize `lint_reasons` (RFC 2383) by xFrednet · Pull Request #120924 · rust-lang/rust
Let's give this another try! The previous stabilization attempt was stalled by some unresolved questions. These have been discussed in a lang team meeting. The last open question, regarding the...GitHub
#pixelart #ドット絵 #art #mastoart #DigitalArt #ferris #rust #rustlang #rustacean #magicalgirl
Just added a new Rust clippy lint inverted_saturating_sub
and extended implicit_saturating_sub
.
Some rare cases but hopefully it'll help find some logic bugs in some code bases. :)
PR: https://github.com/rust-lang/rust-clippy/pull/12476
Extend `implicit_saturating_sub` lint by GuillaumeGomez · Pull Request #12476 · rust-lang/rust-clippy
Fixes #10070. It can serve as base if we want to add equivalent checks for other arithmetic operations. Also one important note: when writing this lint, I realized that I could check for wrong cond...GitHub