Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
thingsiplay ( thingsiplay@beehaw.org )  to Programming@programming.devEnglish · 2 years ago

Announcing Rust 1.85.0 and Rust 2024 | Rust Blog

blog.rust-lang.org

external-link
message-square
9
link
fedilink
  • cross-posted to:
  • rust@lemmy.ml
  • rust@programming.dev
63
external-link

Announcing Rust 1.85.0 and Rust 2024 | Rust Blog

blog.rust-lang.org

thingsiplay ( thingsiplay@beehaw.org )  to Programming@programming.devEnglish · 2 years ago
message-square
9
link
fedilink
  • cross-posted to:
  • rust@lemmy.ml
  • rust@programming.dev
Empowering everyone to build reliable and efficient software.

Finally the new Rust 1.85.0 update is here, with a new Rust Edition 2024.

alert-triangle
You must log in or register to comment.
  • Ephera ( Ephera@lemmy.ml ) 
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 years ago

    Honestly, kind of most excited about std::env::home_dir() being fixed/undeprecated. That’s the kind of thing that some languages would leave unfixed for eternity, until half the community recommends not using the stdlib even for basic uses.

  • FizzyOrange ( FizzyOrange@programming.dev ) 
    link
    fedilink
    arrow-up
    10
    ·
    2 years ago

    So glad they made the sane move and fixed std::env::home_dir(). The previous situation of having it deprecated due to fairly insignificant reasons, while recommending an abandoned crate instead was just silly.

  • Bogasse ( Bogasse@lemmy.ml ) 
    link
    fedilink
    arrow-up
    7
    ·
    2 years ago

    The gen keyword is too much teasing, I know it’s not round the corner but I’m gonna explode 🥺

    • BB_C ( BB_C@programming.dev ) 
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      In case the wording tripped anyone, generators (blocks and functions) have been available for a while as an unstable feature.

      This works (playground):

      #![feature(gen_blocks)]
      
      gen fn gfn() -> i32 {
          for i in 1..=10 {
              yield i;
          }
      }
      
      fn gblock() -> impl Iterator {
          gen {
              for i in 1..=10 {
                  yield i;
              }
          }
      }
      
      fn main() {
          for i in gfn() {
              println!("{i} from gfn()");
          }
          for i in gblock() {
              println!("{i} from gblock()");
          }
      }
      

      Note that the block-in-fn version works better at this moment (from a developer’s PoV) because rust-analyzer currently treats gfn() as an i32 value. But the block-in-fn pattern works perfectly already.

      • TheAgeOfSuperboredom ( TheAgeOfSuperboredom@lemmy.ca ) 
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Amazing! Thanks for that. I didn’t know this was actually available to play with.

  • livingcoder ( livingcoder@programming.dev ) 
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    I love the async closure update and the if-let scoping fix.

  • thingsiplay ( thingsiplay@beehaw.org ) OP
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    BTW no word about the Next Gen Trait solver: https://rustc-dev-guide.rust-lang.org/solve/trait-solving.html

    • TehPers ( TehPers@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      It was mentioned in the notes for 1.84.0 that they began migrating to it. They might be doing it without an edition change if it’s backwards compatible (or if the incompatibilities are considered bugs).

    • Bogasse ( Bogasse@lemmy.ml ) 
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Road to 2027 then?

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 119 users / day
  • 859 users / week
  • 1.93K users / month
  • 4.51K users / 6 months
  • 452 local subscribers
  • 29.3K subscribers
  • 3.09K Posts
  • 23.8K Comments
  • Modlog
  • mods:
  • snowe ( snowe@programming.dev ) 
  • Ategon ( Ategon@programming.dev ) 
  • UlrikHD ( UlrikHD@programming.dev ) 
  • bugsmith ( bugsmith@programming.dev ) 
  • Spyro ( Spyro@programming.dev ) 
  • BE: 0.19.21
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code