ralfbiedert / cheats.rs

Rust Language Cheat Sheet - https://cheats.rs
https://cheats.rs
4.15k stars 394 forks source link

Explain non_exhaustive #125

Closed sanxiyn closed 3 years ago

sanxiyn commented 3 years ago

First, this is a wonderful resource. Thank you so much.

Looking at API Stability, "Adding new variants" is definitely breaking. It is, but then what is the solution? Often The non_exhaustive attribute is the right solution.

Since the reference is (deliberately) written without any historical information, here are some: RFC 2008 and Announcing Rust 1.40.0.

Thanks!

ralfbiedert commented 3 years ago

Thanks for the links, clarifying that sounds good.