Skip to content

Commit

Permalink
Optimizers are not in scope
Browse files Browse the repository at this point in the history
Borrowing language from Ralf Jung from a comment on PR 888
(rust-lang#888 (comment))
describe the relationship of optimizers and what the reference states.
  • Loading branch information
Havvy committed Nov 12, 2020
1 parent c272cca commit 85bcb13
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 85bcb13

Please sign in to comment.