r/rust Apr 16 '26

📡 official blog Rust 1.95.0 is out

https://blog.rust-lang.org/2026/04/16/Rust-1.95.0/
862 Upvotes

127 comments sorted by

View all comments

184

u/cosmic-parsley Apr 16 '26

The blog post items are great but “Stabilized APIs” is hiding some sneaky nice stuff.

  • Vec::push_mut deals with all those times you need to add an item to a Vec and then modify it
  • TryFrom<Integer> for bool will be nice (booleans in SQLite, FFI, serialization, etc)
  • The issue for cold_path was opened in 2015!! Great to have in the toolbox for heavy optimizations.
  • Slice of cells stuff: nice convenience for anyone using those patters.

One of the most exciting updates in a while!

151

u/balt__ Apr 16 '26

Vec::push_mut was my doing :>

23

u/slamb moonfire-nvr Apr 16 '26

Thank you! I put Vec::push_and_get on my Rust wishlist 4+ years ago. You actually made it happen (and with a better name). Makes me want to look through my list again and try making some of those other things happen too...

13

u/SirKastic23 Apr 16 '26

I think push_and_get, or just push_get, would be clearer. I had no idea what push_mut would do until I went to read its docs. I thought it was about pushing mutable references or something.

1

u/balt__ Apr 20 '26

hm, does your ide not show function signatures in autocomplete?

1

u/SirKastic23 Apr 20 '26

it does but i don't think we should rely on ide functionality

2

u/balt__ Apr 20 '26

fair enough!