🎉 Announcing Rust 1.31 and Rust 2018!


#1

This is the start of the Rust 2018 edition, and there’s a lot to say, so I’ll leave that to the blogs.

I’ll add more links as I find them…


#2

I’m having trouble with getting rustfmt on Windows. This is the commands I’ve run so far:

>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2018-12-06, rust version 1.31.0 (abe02cefd 2018-12-04)
info: downloading component 'rustc'
... [snip] ...

   stable-x86_64-pc-windows-msvc updated - rustc 1.31.0 (abe02cefd 2018-12-04)
  nightly-x86_64-pc-windows-msvc updated - rustc 1.32.0-nightly (14997d56a 2018-12-05)

>rustup self update
info: checking for self-updates
info: downloading self-update
info: rustup updated successfully to 1.14.0

>rustup --version
rustup 1.14.0 (1e51b07cc 2018-10-04)

>rustup component add rustfmt
error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'rustfmt' for target 'x86_64-pc-windows-msvc'

The thing that stands out is the 2018-10-04 date for rustup. Am I getting an old version?


#3

You’re not alone: (reddit thread). One person said it worked after reinstalling rustup.


#4

Ahh so I should have updated rustup before updating rust. That makes sense but unfortunately I only thought of it afterwards. I’ll try a reinstall.

EDIT: I’ve tried rustup self uninstall and then reinstalling Rust. Didn’t work. Also tried uninstalling and reinstalling toolchains but that didn’t work either. I think I’ll give up for now and try again later.


#5

There’s a bug, the fix is in the works. Sorry about that! Should be fixed soon.


#6

Thank you for the great work! I’ve been testing beta for a while and I’m really looking forward to use the features on stable.


#7

Congratulations :firecracker::sparkles::confetti_ball: !!!

The new web site of Rust also looks great …


#8

:slight_smile: Thank you very much!
On December 6, kids in Belgium get candy and presents from “sinterklaas”. I’m a grown up now, but this year I still get a present on December 6 :slight_smile: Thanks to all who helped towards this big release in various ways!


#9

Thanks! I did an update to self and reinstalled the stable toolchain and it’s working now.


#10

Many thanks for this update. I just converted a small library to the 2018 style I found that the changes make the language much clearer:

  • No more #[macro use] or extern crate
  • I really like &dyn TraitName. I had so many problems getting used to the dual nature of traits when I came from C++.

Running cargo fix --edition=2018 made the code compile. It then took about 10 minutes to make the above style changes manually.