dtolnay / rustversion

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

Possible to support #[rustc::minimum(1.27)] or the like? #4

Closed mathstuf closed 5 years ago

mathstuf commented 5 years ago

Using attributes which are always-true or always-false under this would then warn/error about being a tautology. This would help make sure that as the minimum version is bumped, old code/checks go away.

It would also act as documentation for the minimum version allowed. (AFAIK, still waiting on that field in Cargo.toml).

dtolnay commented 5 years ago

Seems reasonable. I would accept a PR implementing this.

mathstuf commented 5 years ago

Looks like there's a merged RFC for this now, so I'll close this in preference for that.