dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
326 stars 15 forks source link

Examples checking pre-1.31 features are useless #1

Closed cuviper closed 5 years ago

cuviper commented 5 years ago

The first two given use cases are #[rustc::since(1.26)] for u128 and #[rustc::attr(since(1.27), must_use)]. That seems fine, except select-rustc is a 2018 edition crate, so the fact that you can use this at all implies that your rustc is at least 1.31 already.

It would be nicer to see examples with newer things you might check for, and perhaps state the 1.31 requirement clearly somewhere.

Anyway, it's a cool crate, thanks!