News for hackers. Stuff that matters.
Re:Rust 1.100.0 by IshKebab on Thursday November 12, 2026 @05:06PM (#50474996)
If you access the bool through a long path maybe.

  foo.bar().baz[expensive()].qux.toggle();
Re:Rust 1.100.0 by jacksontheel on Thursday November 12, 2026 @05:33PM (#50475337)
Alright, I'm convinced, that makes a lot of sense.
Re:Rust 1.100.0 by Sharlin on Friday November 13, 2026 @02:46AM (#50479791)
You can of course also do

  long_path_bool ^= true;
but that’s less obvious.
Re:Rust 1.100.0 by ammar_az on Thursday November 12, 2026 @05:38PM (#50475403)
That's the main reason for me as well
Re:Rust 1.100.0 by crabmusket on Thursday November 12, 2026 @08:59PM (#50477118)
This gives me the same feeling as when I saw Rust's map Entry API

https://doc.rust-lang.org/std/collections/hash_map/enum.Entr...

    let mut map: HashMap<&str, u32> = HashMap::new();
    map.entry("poneyland").or_insert(3);
    assert_eq!(map["poneyland"], 3);
It's very ergonomic.
Re:Rust 1.100.0 by voxelghost on Friday November 13, 2026 @02:50AM (#50479827)
cant you just do

    foo.bar().baz[expensive()].qux ^= true;
Re:Rust 1.100.0 by IshKebab on Friday November 13, 2026 @03:43AM (#50480275)
Sure, but should you?
Re:Rust 1.100.0 by voxelghost on Sunday November 15, 2026 @11:52PM (#50514174)
[delayed]