Commit Graph
2346 Commits
Author SHA1 Message Date
Carol (Nichols || Goulding) bad3d2ebcf multipass 2017-11-07 19:01:57 -05:00
Carol (Nichols || Goulding) 88a12e16d4 Sneak in a note about slicing into multibyte chars
Fixes #992. Connects to #979.
2017-11-07 18:48:01 -05:00
Carol (Nichols || Goulding) 751a20903a Sneak in a little note about dereferencing
Fixes #648
2017-11-07 17:53:54 -05:00
Carol (Nichols || Goulding) bb94353136 Snapshot of chapter 4 as sent to steve 2017-11-07 16:47:48 -05:00
Carol (Nichols || Goulding) efad9f7abb Snapshot of chapter 3 as sent to nostarch today, ish 2017-11-07 16:45:03 -05:00
Carol (Nichols || Goulding) 6b795c738b Add text that points out this example won't compile 2017-11-07 16:45:03 -05:00
Carol (Nichols || Goulding) c5ff9d71d9 Update some error output as of Rust 1.21 2017-11-07 15:52:31 -05:00
Carol (Nichols || Goulding) 544d74ae40 Adjust listing/figure numbers
So that Listings and Figures have their own sequences
2017-11-07 15:52:03 -05:00
Carol (Nichols || Goulding) 14839f7961 Fix word wrapping in the box 2017-11-07 14:25:44 -05:00
Carol (Nichols || Goulding) 05651f3aa0 Briefly define what a pointer is
Fixes #365.
2017-11-07 14:21:56 -05:00
Carol (Nichols || Goulding) 599bdfd995 Cargo.lock file rearranged 2017-11-07 14:09:56 -05:00
Carol (Nichols || Goulding) 6aad5008b6 Fix some fancy quotes 2017-11-07 14:09:11 -05:00
Carol (Nichols || Goulding) 5cae9ae3d1 Clarify that we're talking about the types in the Data Types section
Fixes #869.
2017-11-07 14:07:16 -05:00
Carol (Nichols || Goulding) fa96d84192 Make a few small corrections to the redirect pages 2017-11-03 12:08:11 -04:00
Carol (Nichols || Goulding) 3686e89296 Merge remote-tracking branch 'origin/pr/981' 2017-11-03 11:48:55 -04:00
Carol (Nichols || Goulding) 8a145ebea5 Make changes caught during page review 2017-11-02 17:27:37 -04:00
Carol (Nichols || Goulding) 84e5315d4d Adjust the table of contents to match the current appendix plan 2017-11-01 10:29:41 -04:00
Carol (Nichols || Goulding) ba73893ca6 Merge pull request #970 from rust-lang/ch17-edits-to-submit
[READY FOR REVIEW] Ch17 edits to submit
2017-10-31 17:01:22 -04:00
Carol (Nichols || Goulding) e7df305030 Address steve suggestions! 2017-10-31 16:41:25 -04:00
Steve Klabnik 6af14bef2f Merge pull request #941 from jkeiser/redirect-associated-types
Add redirect link to correct new page
2017-10-31 14:43:35 -04:00
Carol (Nichols || Goulding) f1a8e98c5d Merge pull request #989 from rust-lang/code-style-fix
Fix style in guessing game
2017-10-31 12:57:18 -04:00
steveklabnik 9aaf517b48 Fix style in guessing game
These should not be aligned
2017-10-31 12:24:48 -04:00
Carol (Nichols || Goulding) e0b2afce2b Update error message output 2017-10-30 14:52:20 -04:00
Carol (Nichols || Goulding) 73c5df6a03 Renumber listings in Chapter 3
Since tables/figures/listings get their own sequence
2017-10-30 14:03:27 -04:00
Carol (Nichols || Goulding) bef1228849 Merge pull request #988 from mareq/ch12-02-minor-typo
Correct minor typo
2017-10-30 12:58:28 -04:00
Carol (Nichols || Goulding) 9ce65b8135 Merge pull request #983 from chenl/patch-5
Update Backtrace format when discussing `panic!`
2017-10-30 12:57:47 -04:00
Carol (Nichols || Goulding) eb6bf09e30 Merge pull request #976 from kdaker/master
Adds char as a copy type in ownership (Chapter 4).
2017-10-30 12:54:22 -04:00
Carol (Nichols || Goulding) 54dab85b4a use -> using 2017-10-30 11:16:28 -04:00
Carol (Nichols || Goulding) d4879ff7fc grumble mumble ordered list bug 2017-10-30 11:13:19 -04:00
mareq dd33471e00 Correct minor typo 2017-10-29 22:34:56 +00:00
Chen Rotem Levy 203c35ae8d Update chapter09.md
In rust v1.17 release notes:

> Backtraces now have nicer formatting, eliding some things by default.

If it is too late to change the page layout, consider replacing

    RUST_BACKTRACE=1 cargo run

with

    RUST_BACKTRACE=full cargo run
2017-10-28 11:13:11 +03:00
Carol (Nichols || Goulding) 7db393dae7 Update theme/index.hbs to make printing work again
From mdBook cd711bfb1ca161e8a834f4527f3936f818a6f50f
2017-10-26 14:36:41 -04:00
Carol (Nichols || Goulding) 0d9d5e0c5a Specify that mdbook version should really match what rust-lang/rust is using 2017-10-26 12:32:51 -04:00
Kareem Daker e1ee0a4b86 Adds char as a copy type.
Adds char to the list of types that are `Copy`.
2017-10-24 06:27:34 -07:00
Ludwig Weinzierl 9d57d663d4 Fix links to second edition on redirect pages
Search engines often show the redirect page for search terms like "rust
topic" or "rust book topic". Currently the redirect targets all go to the
index.html of the second edition of the book. This discourages users
to use the second edition, because many will click on the direct link to
the first edition out of laziness. In addition, as long as the pages of
the second edition are not well linked, the old pages will probably stay
at the top of the search results.

To fix this, this commit changes the target links to go to the related
content in the second edition, in the following way:

Old content maps in different ways to new content:

  1.  1:1 mapping

      content is comprehensively covered in a single location of the
      second edition

  2. basic/advanced mapping

     content is comprehensively covered in two locations of the second
     edition; first location covers the basics, second location covers
     advanced topics

  3.  split mapping

      content is covered in muliple locations of the second edition

  4.  moved

      content has moved to another place

  5.  removed

      content doesn't exist in the second edition

This commit handles these cases in the following way:

1. Mapping type 1: 1:1 mapping

   Change the link target from "second-edition/index.html" to the
   respective chapter, page or section of the second edition.
   Change the link text from "Index of the second edition..." to
   either of:

	- "Related chapter in the second edition"

	- "Related page in the second edition"

	- "Related section in the second edition"

   "Related" was chosen because content of two versions is at least
   related but not necessarily equivalent.

   Example: closures.md

2. Mapping type 2: basic/advanced mapping

   Change the link target from "second-edition/index.html" to the
   respective chapter, page or section of the second edition. Add
   a second link target for the advanced chapter, page or section.
   Change the link text like for type 1. Add the second link with
   the following text: "Related chapter in the second edition
   of The Rust Programming Language (covering more advanced
   topics)". Similar to the messages of type 2 there are variants
   with "page" and "section".

   Example: lifetimes.md

3. Mapping type 3: split mapping

   Change similar to changes for type 2. but add multiple links
   with text in parens describing relationship.

4. Mapping type 4: moved

   No changes.
   Example: compiler-plugins.md

5. Mapping type 5: removed

   No changes. See "Improvements" below.
   Example: attributes.md

Improvements:
  This commit tries to introduce the target links with a minimum of changes.
  Copy was adapted only to the extent absolutely necessary. This leaves room
  for improvements:

  - Better deal with case 3. Describe mapping in copy not only link text.
    Actually refer to the links in the body copy.

  - Redirect pages of type 5 (content doesn't exist in second edition)
    should distinguish between "Content removed for good" and "Content
    not ready yet". For the latter category we could link to stub pages.

All the new links were tested manually. The html was produced by a
little script that invokes rustdoc, builds the book and copies
everything into place. The script is not part of this commit.

Here is a list with all mappings:

associated-types.html		-1->	ch19-03-advanced-traits.html#associated-types
attributes.html			-5-> 	index.html
bibliography.html		-5->	index.html
borrow-and-asref.html		-5->	index.html
casting-between-types.html	-5->	index.html
choosing-your-guarantees.html	~1~>	ch15-00-smart-pointers.html
closures.html			-1->	ch13-01-closures.html
comments.html 			-1->	ch03-04-comments.html
compiler-plugins.html		-4->	../unstable-book/language-features/plugin.html
concurrency.html        	-1->	ch16-00-concurrency.html
conditional-compilation.html	-5->	index.html
const-and-static.html		~1~>	ch19-01-unsafe-rust.html#accessing-or-modifying-a-mutable-static-variable
crates-and-modules.html		-3->	Modules: ch07-00-modules.html
					Crates: ch14-00-more-about-cargo.html
deref-coercions.html		~1~>	ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods
documentation.html		~1~>	ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments
drop.html			-1->	ch15-03-drop.html
effective-rust.html		-5->	index.html
enums.html      		-1->	ch06-01-defining-an-enum.html
error-handling.html		-1-> 	ch09-00-error-handling.html
ffi.html			-1->	ch19-01-unsafe-rust.html#calling-an-unsafe-function-or-method
functions.html			-1->	ch03-03-how-functions-work.html
generics.html			-1->	ch10-00-generics.html
getting-started.html		~1~>	ch01-00-introduction.html
glossary.html			-5->	index.html
guessing-game.html		-1->	ch02-00-guessing-game-tutorial.html
if-let.html			-1->	ch06-03-if-let.html
if.html				-1->	ch03-05-control-flow.html#if-expressions
iterators.html			-1->	ch13-02-iterators.html
lifetimes.html			-2->	ch10-03-lifetime-syntax.html
					ch19-02-advanced-lifetimes.html
loops.html			-1->	ch03-05-control-flow.html#repetition-with-loops
macros.html			-5->	index.html (appendix-05-macros.html is in TOC, but doesn't exist)
match.html			-2->	ch06-02-match.html
				-2-> 	ch18-00-patterns.html
method-syntax.html		-1->	ch05-03-method-syntax.html
mutability.html			-1->	ch03-01-variables-and-mutability.html
operators-and-overloading.html	-1-> 	ch19-03-advanced-traits.html#operator-overloading-and-default-type-parameters
ownership.html			-1->	ch04-00-understanding-ownership.html
patterns.html			-2->	ch06-02-match.html#patterns-that-bind-to-values
					ch18-03-pattern-syntax.html
primitive-types.html		~1~>	ch03-02-data-types.html
procedural-macros.html		-5->	index.html (appendix-05-macros.html is in TOC, but doesn't exist)
raw-pointers.html		~1~>	ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
references-and-borrowing.html	-1->	ch04-02-references-and-borrowing.html
release-channels.html		-5->	index.hmtl
strings.html			~2~>	ch04-03-slices.html#string-slices [Should be type 3 maybe with distinction &str and String]
				~2~>	ch08-02-strings.html
structs.html			-1->	ch05-00-structs.html
syntax-and-semantics.html	~3~>	ch03-00-common-programming-concepts.html
					appendix-01-keywords.html
					appendix-02-operators.html
					appendix-05-macros.html [WIP]
syntax-index.html		-5->	index.html
testing.html			-1->	ch11-00-testing.html
the-stack-and-the-heap.html	-5->	index.html
trait-objects.html		-1->	ch17-02-trait-objects.html
traits.html			-2->	ch10-02-traits.html
					ch19-03-advanced-traits.html
type-aliases.html		~1~>	ch19-04-advanced-types.html#type-aliases-create-type-synonyms
ufcs.html			-5->	index.html
unsafe.html			~1~>	ch19-01-unsafe-rust.html
unsized-types.html		~1~>	ch19-04-advanced-types.html#dynamically-sized-types--sized
using-rust-without-the[..].html	-5->	index.html
variable-bindings.html		-5->	index.html
vectors.html			-1->	ch08-01-vectors.html
2017-10-23 21:07:33 +02:00
Carol (Nichols || Goulding) 38cc9a8ba6 Capture a snapshot of chapter 3-ish 2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) d4c77666f4 Update output, make everything match page review text 2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) f28e635661 fancy quotes 2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) aee4e404f7 Mention the return keyword
Fixes #885
2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) af912a379d Add forward reference to documentation comments
Fixes #810.
2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) b3382f836a Clarify single quotes go with chars and double go with strings
Fixes #803.
2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) 0af1a6559e Clarify which line without the semicolon that we're talking about
Fixes #772.
2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) d5c1e36f07 Save nostarch version with approximately what we just sent them
I don't have a way to generate this markdown from the page review PDF,
but having this snapshot might be useful in case we make changes
upstream in between page reviews.
2017-10-20 15:27:22 -04:00
Carol (Nichols || Goulding) 9b0c65bde6 Merge pull request #973 from j3parker/inconsistency
Fix inconsistency in final code listing
2017-10-20 15:22:35 -04:00
Carol (Nichols || Goulding) 227829cf0b Edits made during page review 2017-10-20 12:04:43 -04:00
Carol (Nichols || Goulding) d2bccd30b6 return key -> enter key 2017-10-19 18:36:18 -04:00
Carol (Nichols || Goulding) a0b6dd108a Curly brace -> curly bracket everywhere 2017-10-19 18:29:30 -04:00
Jacob Parker 4d116021eb Fix inconsistency in final code listing
I forgot to apply the change from the penultimate listing of `main()` to
the summary at the end of the chapter.
2017-10-19 15:27:29 -04:00
Carol (Nichols || Goulding) e0a956754f Merge pull request #965 from j3parker/take
(minor) Use Iterator::take rather than a manual counter
2017-10-19 15:04:51 -04:00
Carol (Nichols || Goulding) ccb17fc2fb Merge pull request #967 from jtescher/non-negative-examples
Switch from i32 to u32 for shoe size and workout intensity
2017-10-19 15:03:57 -04:00