This repository has been archived by the owner on May 5, 2019. It is now read-only.
forked from rust-lang/edition-guide
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0afaf2
commit b8e75d4
Showing
7 changed files
with
98 additions
and
161 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
# Rust 2018 | ||
|
||
The edition system was created for the release of Rust 2018. The theme of Rust 2018 | ||
is *productivity*. Rust 2018 improves upon Rust 2015 through new features, | ||
simpler syntax in some cases, a smarter borrow-checker, and a host of other things. | ||
These are all in service of the productivity goal. Rust 2015 was a foundation; | ||
Rust 2018 smooths off rough edges, makes writing code simpler and easier, | ||
and removes some inconsistencies. | ||
该版本系统是为 Rust 2018 的发布而创建的. Rust 2018 的主题是*生产力*。 | ||
Rust 2018 通过新功能,在某些情况下更简单的语法,更智能的借用检查器以及许多其他东西来改进 Rust 2015。 | ||
这些都是为了提高生产力目标。 Rust 2015 是一个基础; Rust 2018 使粗糙边缘平滑,使编写代码更简单,更容易,并消除了一些不一致性。 |
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Module system | ||
# 模块系统 | ||
|
||
[path clarity changes]: path-clarity.md | ||
[路径清晰度变化]: path-clarity.md | ||
|
||
In this chapter of the guide, we discuss a few changes to the module system. | ||
The most notable of these are the [path clarity changes]. | ||
在本指南的这一章中,我们将讨论模块系统的一些变化。 | ||
其中最值得注意的是 [路径清晰度变化]。 |
This file contains 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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
# More visibility modifiers | ||
# 更加可见的修饰符 | ||
|
||
![Minimum Rust version: 1.18](https://img.shields.io/badge/Minimum%20Rust%20Version-1.18-brightgreen.svg) | ||
|
||
You can use the `pub` keyword to make something a part of a module's public interface. But in | ||
addition, there are some new forms: | ||
您可以使用 `pub` 关键字将某些内容作为模块公共接口的一部分。 但此外,还有一些新形式: | ||
|
||
```rust,ignore | ||
pub(crate) struct Foo; | ||
pub(in a::b::c) struct Bar; | ||
``` | ||
|
||
The first form makes the `Foo` struct public to your entire crate, but not | ||
externally. The second form is similar, but makes `Bar` public for one other | ||
module, `a::b::c` in this case. | ||
第一种形式使 `Foo` 结构公开在整个crate中,但不是外部的。 | ||
第二种形式是类似的,只在另一种模块 `a::b::c` 中,`Bar`是公开的。 |
This file contains 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 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
Oops, something went wrong.