Skip to content

Commit a8afdca

Browse files
authored
Merge pull request #902 from Havvy/on-opt
Describe relationship between reference and optimizers
2 parents 7369c11 + 85bcb13 commit a8afdca

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
book
2+
stable-check/

src/introduction.md

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ pages such as [linkage] that still describe how `rustc` works.
3636
This book also only serves as a reference to what is available in stable
3737
Rust. For unstable features being worked on, see the [Unstable Book].
3838

39+
Rust compilers, including `rustc`, will perform optimizations. The reference
40+
does not specify what optimizations are allowed or disallowed. Instead, think of
41+
the compiled program as a black box. You can only probe by running it, feeding
42+
it input and observing its output. Everything that happens that way must conform
43+
to what the reference says.
44+
3945
Finally, this book is not normative. It may include details that are
4046
specific to `rustc` itself, and should not be taken as a specification for
4147
the Rust language. We intend to produce such a book someday, and until then,

0 commit comments

Comments
 (0)