1
+ <!--
1
2
# What are Editions?
3
+ -->
4
+ # エディションとは?
2
5
6
+ <!--
3
7
Rust ships releases on a six-week cycle. This means that users get a constant
4
8
stream of new features. This is much faster than updates for other languages,
5
9
but this also means that each update is smaller. After a while, all of those
6
10
tiny changes add up. But, from release to release, it can be hard to look back
7
11
and say *"Wow, between Rust 1.10 and Rust 1.20, Rust has changed a lot!"*
12
+ -->
8
13
14
+ Rustは6週間ごとにリリースを行います。
15
+ これにより、ユーザーは新しい機能を常に手に入れることができます。
16
+ これは他の言語よりも速いサイクルですが、アップデートのサイズは小さくなります。
17
+ しばらくするとこれらの小変更が積み重なってきますが、いくつかのリリースを振り返って、「おお、バージョン1.10から1.20の間にRustは大きく変わったなぁ」と言うのは難しいかも知れません。
18
+
19
+ <!--
9
20
Every two or three years, we'll be producing a new *edition* of Rust. Each
10
21
edition brings together the features that have landed into a clear package, with
11
22
fully updated documentation and tooling. New editions ship through the usual
12
23
release process.
24
+ -->
25
+
26
+ 2,3年に一度、Rustの新しい「エディション」を作成します。
27
+ 各エディションはそれまでRustに加えられた変更をまとめ上げたもので、最新のドキュメントとツールもそれに含まれます。
28
+ 新しいエディションは通常のリリースプロセスを経てリリースされます。
13
29
30
+ <!--
14
31
This serves different purposes for different people:
15
32
16
33
- For active Rust users, it brings together incremental changes into an
@@ -21,9 +38,23 @@ This serves different purposes for different people:
21
38
22
39
- For those developing Rust itself, it provides a rallying point for the project as a
23
40
whole.
41
+ -->
42
+
43
+ エディションは様々な人の異なる要求を満たします。
44
+
45
+ - Rustのアクティブなユーザーにとっては、6週間ごとににリリースされた機能変更をわかりやすくまとめたパッケージとなります。
46
+
47
+ - Rustを使っていない人にとっては、大きな変更が施されたことを知らせる役割を果たし、それによってRustを使ってみようと思うようになるかも知れません。
24
48
49
+ - Rustの内部開発者にとっては、プロジェクト全体の長期的なゴールになります。
50
+
51
+
52
+ <!--
25
53
## Compatibility
54
+ -->
55
+ ## 互換性
26
56
57
+ <!--
27
58
When a new edition becomes available in the compiler, crates must explicitly opt
28
59
in to it to take full advantage. This opt in enables editions to contain
29
60
incompatible changes, like adding a new keyword that might conflict with
@@ -34,10 +65,26 @@ Edition changes only affect the way the compiler initially parses the code.
34
65
Therefore, if you're using Rust 2015, and
35
66
one of your dependencies uses Rust 2018, it all works just fine. The opposite
36
67
situation works as well.
68
+ -->
69
+
70
+ 新しいエディションがコンパイラで利用可能になった際に、その利点を最大限に活かすためには、クレートは明示的にオプトインする必要があります。
71
+ このオプトインはエディションに非互換の変更を加えるために必要で、例えば、既存のコードで使われている識別子と競合する新たなキーワードを導入したり、警告だったものをエラーにする、などの変更を加えることができるようになります。
72
+ Rustのコンパイラはこれまでの全てのエディションをサポートしていて、複数のクレートが異なるエディションを使用していても一つにリンクできます。
73
+ エディションの変更はコンパイラが最初にコードを構文解析する際の動作のみに影響します。
74
+ 従って、例ばあなたがRust 2015を使っていて、依存するクレートが Rust 2018を使っていても全く問題なく動作します。
75
+ その逆の場合も同様です。
37
76
77
+
78
+ <!--
38
79
Just to be clear: most features will be available on all editions.
39
80
People using any edition of Rust will continue to see improvements as new
40
81
stable releases are made. In some cases however, mainly when new keywords are
41
82
added, but sometimes for other reasons, there may be new features that are only
42
83
available in later editions. You only need to upgrade if you want to take
43
- advantage of such features.
84
+ advantage of such features.
85
+ -->
86
+
87
+ 念の為はっきりさせておきますが、ほとんどの機能は全てのエディションで利用可能です。
88
+ どのエディションを利用していても、新たな安定板リリースが出た際には改善を見ることができます。
89
+ 時折、例えば新たなキーワードが導入されたりその他の理由で、あるエディション以降でしか利用できない機能追加があります。
90
+ そのような機能を利用したい時にエディションのアップデートを検討するのが良いでしょう。
0 commit comments