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

Remove extern crate from examples (or add comment about Rust edition) #58

Closed
HarrisonMc555 opened this issue Jun 20, 2019 · 5 comments
Closed

Comments

@HarrisonMc555
Copy link
Contributor

Proposal: I think we should remove the extern crate declaration in the README, or at least put a comment above it noting that it is only necessary if you're on the Rust 2015 edition.

Background: I am a mentor on exercism.io, and our first "real" exercise (after "Hello, World") is the "Reverse String" exercise. We have a "bonus" test case where a string contains "characters" that are multiple code points. Most students rightly find this crate and use it to extract the graphemes from a string and reverse those. However, many of them leave in the extern crate declaration, even though essentially all of them are using Rust 2018 and don't need it.

@Manishearth
Copy link
Member

I'm all for just removing it without a comment.

@Manishearth
Copy link
Member

Fixed. Crate itself is on 2015 edition, but I made a PR to fix that: #59

@Manishearth
Copy link
Member

Hm, so there's a problem, we run rustdoc --test on the readme, but you need cargo to orchestrate crate imports for stuff like this.

@HarrisonMc555
Copy link
Contributor Author

Hmm...I was going to say you could use the "doc comment" thing where you start a line with # and it's not displayed in the documentation, but that wouldn't work on a README. Bummer. I'm guessing you looked here and determined it wasn't possible?

Are you planning on just upgrading to Rust 2018 and not supporting Rust 2015 (via #59)? Let me know if there's anything I can do to help.

@Manishearth
Copy link
Member

Manishearth commented Jun 20, 2019 via email

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

Successfully merging a pull request may close this issue.

2 participants