forked from rust-lang/book
-
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.
Merge branch 'master' of github.com:rust-lang/book
- Loading branch information
Showing
141 changed files
with
11,089 additions
and
12,271 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
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,2 +1,6 @@ | ||
[book] | ||
title = "The Rust Programming Language" | ||
author = "The Rust Project Developers" | ||
|
||
[output.html] | ||
additional-css = ["src/theme/first-edition.css"] |
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
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.warning { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: rgb(242, 222, 222); | ||
border-bottom-color: rgb(238, 211, 215); | ||
border-bottom-left-radius: 4px; | ||
border-bottom-right-radius: 4px; | ||
border-bottom-style: solid; | ||
border-bottom-width: 0.666667px; | ||
border-image-outset: 0 0 0 0; | ||
border-image-repeat: stretch stretch; | ||
border-image-slice: 100% 100% 100% 100%; | ||
border-image-source: none; | ||
border-image-width: 1 1 1 1; | ||
border-left-color: rgb(238, 211, 215); | ||
border-left-style: solid; | ||
border-left-width: 0.666667px; | ||
border-right-color: rgb(238, 211, 215); | ||
border-right-style: solid; | ||
border-right-width: 0.666667px; | ||
border-top-color: rgb(238, 211, 215); | ||
border-top-left-radius: 4px; | ||
border-top-right-radius: 4px; | ||
border-top-style: solid; | ||
border-top-width: 0.666667px; | ||
color: rgb(185, 74, 72); | ||
margin-bottom: 0px; | ||
margin-left: 0px; | ||
margin-right: 0px; | ||
margin-top: 30px; | ||
padding-bottom: 8px; | ||
padding-left: 14px; | ||
padding-right: 35px; | ||
padding-right: 14px; | ||
padding-top: 8px; | ||
} | ||
.warning strong { | ||
color: rgb(185, 74, 72) | ||
} | ||
.warning a { | ||
color: rgb(0, 136, 204) | ||
} | ||
.warning .message { | ||
margin-right: 14px; | ||
} | ||
.warning .message:last-child { | ||
margin-right: 21px; | ||
} | ||
.warning .button { | ||
border: none; | ||
background: none; | ||
color: inherit; | ||
cursor: pointer; | ||
font-size: 14px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div id="draft-warning" class="warning"> | ||
<span class="message">You are reading an <strong>outdated</strong> edition of TRPL. For more, go <a href="../index.html">here</a>.</span> | ||
<button type="button" id="hide-draft-warning" title="Hide draft warning" class="button"> | ||
<i class="fa fa-times"></i> | ||
</button> | ||
</div> | ||
<!-- Hide / unhide warning before it is displayed --> | ||
<script type="text/javascript"> | ||
var warning = localStorage.getItem('trpl-first-edition-draft-warning'); | ||
if (warning === 'hidden') { | ||
Array | ||
.from(document.querySelectorAll('#page-wrapper')) | ||
.forEach(function(block) { block.classList.remove('has-warning'); }); | ||
var elem = document.getElementById("draft-warning"); | ||
elem.parentNode.removeChild(elem); | ||
} | ||
document.addEventListener("DOMContentLoaded", function(event) { | ||
document.getElementById("hide-draft-warning").addEventListener("click", function(e) { | ||
var elem = document.getElementById("draft-warning"); | ||
elem.parentNode.removeChild(elem); | ||
localStorage.setItem('trpl-first-edition-draft-warning', 'hidden'); | ||
}); | ||
}); | ||
</script> |
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,11 +1,25 @@ | ||
% The Rust Programming Language | ||
# The Rust Programming Language | ||
|
||
There are two editions of "The Rust Programming Language": | ||
The current edition of "The Rust Programming Language" is the second | ||
edition, which you can [read here](second-edition/index.html). | ||
|
||
* [First edition](first-edition/index.html) | ||
* [Second edition](second-edition/index.html) | ||
The source for all editions lives [on GitHub](https://github.com/rust-lang/book). | ||
Please open issues with any questions, concerns, or tweaks. | ||
|
||
The second edition is a complete re-write. It is still under construction, | ||
though it is far enough along to learn most of Rust. We suggest reading the | ||
second edition and then checking out the first edition later to pick up some of | ||
the more esoteric parts of the language. | ||
## Notes | ||
|
||
The second edition is still receiving some minor edits, but is effectively | ||
complete. It will be [available in dead-tree form through NoStarch | ||
Press](https://nostarch.com/Rust) once these final edits are complete. | ||
|
||
The second edition is a complete re-write of TRPL, from the ground up, | ||
and is therefore very different from the first edition. | ||
|
||
## Other editions | ||
|
||
We keep older editions of TRPL online for history's sake. | ||
|
||
### First Edition | ||
|
||
You can [read the first edition of "The Rust Programming Language" | ||
here](first-edition/index.html). |
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
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
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
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
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
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
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.