Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README is wrong about when impl Trait was stabilized. #139

Closed
rodrimati1992 opened this issue Nov 23, 2020 · 2 comments
Closed

README is wrong about when impl Trait was stabilized. #139

rodrimati1992 opened this issue Nov 23, 2020 · 2 comments

Comments

@rodrimati1992
Copy link

The readme claims that impl Trait was stabilized in Rust 1.31.0:

Strum is compatible with versions of rustc >= 1.31.0. That's the earliest version of stable rust that supports impl trait

But it actually was stabilized in Rust 1.26.0:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1260-2018-05-10

impl Trait is now stable allowing you to have abstract types in returns or in function parameters. E.g. fn foo() -> impl Iterator<Item=u8> or fn open(path: impl AsRef<Path>).

Example in godbolt:
https://rust.godbolt.org/z/1oqcej

@Peternator7
Copy link
Owner

Looks like you're correct. I believe 1.31 is rust 2018, and that's the actually reason for the MSRV.

Will accept a PR with the fix or change myself.

@rodrimati1992
Copy link
Author

From looking at the dependencies, I discovered that syn 1.0 requires Rust 1.31.

Version requirement: Syn supports rustc 1.31 and up.

I guess all that needs to change is the README, mentioning syn's minimum supported Rust version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants