-
Notifications
You must be signed in to change notification settings - Fork 135
Add 2018-specific changes. #130
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 2018-Specific Changes | ||
|
||
The following is a summary of changes that only apply to code compiled with | ||
the 2018 edition compared to the 2015 edition. | ||
|
||
## Rust | ||
- [Non-lexical lifetimes] (future inclusion planned for 2015 edition) | ||
- [At most once] `?` macro repetition operator. | ||
- [Path changes]: | ||
- `use` declarations must begin with: | ||
- `crate` – refers to the current crate. | ||
- `self` – refers to the current module. | ||
- `super` – refers to the parent module. | ||
- An external crate name. | ||
- `::` – must be followed by an external crate name. This is required | ||
if an external crate has the same name as an in-scope item, to catch | ||
possible ambiguities with [uniform paths] (which is planned for | ||
inclusion soon [#55618]). | ||
- Paths in `pub(in path)` visibility modifiers must start with `crate`, | ||
`self`, or `super`. | ||
- [Anonymous trait function parameters] are not allowed. | ||
- [Trait function parameters] may use any irrefutable pattern when the | ||
function has a body. | ||
- [`dyn`] is a [strict keyword], in 2015 it is a [weak keyword]. | ||
- `async`, `await`, and `try` are [reserved keywords]. | ||
- The following lints are now deny by default: | ||
- [overflowing_literals] | ||
- [tyvar_behind_raw_pointer] | ||
|
||
## Cargo | ||
- If there is a target definition in a `Cargo.toml` manifest, it no longer | ||
automatically disables automatic discovery of other targets. | ||
- Target paths of the form `src/{target_name}.rs` are no longer inferred for | ||
targets where the `path` field is not set. | ||
- `cargo install` for the current directory is no longer allowed, you must | ||
specify `cargo install --path .` to install the current package. | ||
|
||
[#55618]: https://github.com/rust-lang/rust/issues/55618 | ||
[Anonymous trait function parameters]: rust-2018/trait-system/no-anon-params.html | ||
[At most once]: rust-2018/macros/at-most-once.html | ||
[Non-lexical lifetimes]: rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.html | ||
[Path changes]: rust-2018/module-system/path-clarity.html | ||
[Trait function parameters]: https://doc.rust-lang.org/stable/reference/items/traits.html#parameter-patterns | ||
[`dyn`]: rust-2018/trait-system/dyn-trait-for-trait-objects.html | ||
[overflowing_literals]: https://github.com/rust-lang/rfcs/blob/master/text/2438-deny-integer-literal-overflow-lint.md | ||
[reserved keywords]: https://doc.rust-lang.org/reference/keywords.html#reserved-keywords | ||
[strict keyword]: https://doc.rust-lang.org/reference/keywords.html#strict-keywords | ||
[tyvar_behind_raw_pointer]: https://github.com/rust-lang/rust/issues/46906 | ||
[uniform paths]: rust-2018/module-system/path-clarity.html#uniform-paths | ||
[weak keyword]: https://doc.rust-lang.org/reference/keywords.html#weak-keywords |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.