Announcing Rust 1.33.0

#1

The headline features in 1.33 are:

  • const fn improvements
  • Pinning
  • Import as _
  • More const methods on numeric types
  • Library stabilizations

See the blog post and detailed release notes.

10 Likes

#2

:clap: Rust 1.33 :clap:

0 Likes

#3

I’ve tried 1.33 with no breakages, but with:

warning: use of deprecated item 'std::error::Error::cause': replaced by Error::source, which can support downcasting

which seems to apply to error-chain. My Cargo.toml specifies error-chain 0.12, although I notice that Cargo.lock has both 0.12.0 and 0.9.0.

0 Likes

#4

What are “irrefutable destructuring patterns”?

0 Likes

#5
const fn foo((x, y): (u8, u8)) { ... })

It’s referring to the argument pattern, (x, y): (u8, u8). That’s a tuple argument being unpacked into its two parts, locally named x and y. This has worked in regular functions for a long time, but I guess you couldn’t do this in const functions before.

1 Like

#6

I think the “irrefutable” word is confusing me ^^’ (not native English speaker)

1 Like

#7

Ah, “irrefutable” means that the pattern will always match. Compare this to refutable match patterns, like matching a particular enum variant which might not succeed.

1 Like

#8

There’s more info in a relevant section of TRPL: https://doc.rust-lang.org/book/ch18-02-refutability.html?highlight=refutability#refutability-whether-a-pattern-might-fail-to-match

3 Likes

#9

Thanks! Makes more sense now

1 Like

#10

This sounds great! Compile time evaluated functions are great! Especially with annoying constants and stuff.
On a side note, is there any news on when the ! never type will be stabilized?

0 Likes

#11

congras!!!

Now is it possible to write a tree with Pin instead of layers of containers?

0 Likes

#12

Relevant quote from TWiR quote of the week :stuck_out_tongue:

3 Likes