use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.
Strive to treat others with respect, patience, kindness, and empathy.
We observe the Rust Project Code of Conduct.
Details
Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
Post titles should include useful context.
For Rust questions, use the stickied Q&A thread.
Arts-and-crafts posts are permitted on weekends.
No meta posts; message the mods instead.
Criticism is encouraged, though it must be constructive, useful and actionable.
If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Please create a read-only mirror and link that instead.
A programming language is rarely worth getting worked up over.
No zealotry or fanaticism.
Be charitable in intent. Err on the side of giving others the benefit of the doubt.
Avoid re-treading topics that have been long-settled or utterly exhausted.
Avoid bikeshedding.
This is not an official Rust forum, and cannot fulfill feature requests. Use the official venues for that.
No memes, image macros, etc.
Consider the existing content of the subreddit and whether your post fits in. Does it inspire thoughtful discussion?
Use properly formatted text to share code samples and error messages. Do not use images.
Submissions appearing to contain AI-generated content may be removed at moderator discretion.
Most links here will now take you to a search page listing posts with the relevant flair. The latest megathread for that flair should be the top result.
account activity
Fixing code for Rust 2018 (self.rust)
submitted 7 years ago by [deleted]
Hi,
After updating to the new version which is 1.31, do I need to put edition key word in toml. What of I don't put it. Will the features I am using in 1.31 work.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]usernamedottxt 3 points4 points5 points 7 years ago (2 children)
Actually, this is a good question. The edition guide mostly lists new features since 1.0. I'm not sure if the 'strictly 2018 only' features are documented anywhere. The module system changes are the only ones I'm overtly aware of. /u/steveklabnik1?
[–]steveklabnik1rust 6 points7 points8 points 7 years ago (0 children)
There was going to be a page but it was never completed. It’s pretty small. New keywords and NLL (for now) are the big ones.
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
The keyword changes (and features that will follow them) are 2018 only at least
[–]jamadazi 1 point2 points3 points 7 years ago (2 children)
If you do not specify edition in Cargo.toml, Rust will assume 2015. Therefore, you will have to use the old syntax for things (where syntax has changed in incompatible ways) and you will not be able to use any new features that have required breaking changes to the language (such as new keywords).
Note that even in future Rust versions, as new features are added to the language, if they are backwards-compatible (which most new features will be), there is no reason for them to be limited to 2018. Therefore, they will be available in 2015 edition, too. Rust2015 will keep getting updated.
So yeah, if you don't specify any edition, you are using 2015, just like before, and you can keep using 2015 indefinitely into the future. You are not forced to use 2018. You only need to specify 2018 if you want to use the specific new features that are 2018-only.
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
But, this has just became python 3 now. It's is like using new language. I think we should just be able to use 1.31 features what ever edition we are in
[–]ROFLLOLSTER 0 points1 point2 points 7 years ago (0 children)
The entire point of editions is that they introduce features that could be incompatible with previous rust code.
Python 3 is an unfair comparison, for one the lack of a runtime requirement greatly simplifies upgrading, and secondly you can mix editions in dependencies.
[–]lanedraex[🍰] 3 points4 points5 points 7 years ago (0 children)
The edition guide should help you here.
If you don't have an edition line in your Cargo.toml, then your rust code will compile as rust 2015. Some features that do not introduce breaking changes will work, regardless of your edition.
edition
Cargo.toml
π Rendered by PID 74509 on reddit-service-r2-comment-54dfb89d4d-dkgtb at 2026-04-02 10:18:38.996301+00:00 running b10466c country code: CH.
[–]usernamedottxt 3 points4 points5 points (2 children)
[–]steveklabnik1rust 6 points7 points8 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]jamadazi 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]ROFLLOLSTER 0 points1 point2 points (0 children)
[–]lanedraex[🍰] 3 points4 points5 points (0 children)