Skip to content
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

Describe relationship between reference and optimizers #902

Merged
merged 2 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
book
stable-check/
6 changes: 6 additions & 0 deletions src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ pages such as [linkage] that still describe how `rustc` works.
This book also only serves as a reference to what is available in stable
Rust. For unstable features being worked on, see the [Unstable Book].

Rust compilers, including `rustc`, will perform optimizations. The reference
does not specify what optimizations are allowed or disallowed. Instead, think of
the compiled program as a black box. You can only probe by running it, feeding
it input and observing its output. Everything that happens that way must conform
to what the reference says.

Finally, this book is not normative. It may include details that are
specific to `rustc` itself, and should not be taken as a specification for
the Rust language. We intend to produce such a book someday, and until then,
Expand Down