Commit Graph

2615 Commits

Author SHA1 Message Date
Tshepang Lekhonkhobe
0d033dd7c2 reference: get consistent by removing unneeded whitespace 2015-06-09 00:00:20 +02:00
Tshepang Lekhonkhobe
e305674945 book: remove a sentence that is not clear 2015-06-08 23:35:40 +02:00
saml
a6dd871821 Fixing typo, [[lib]] to [lib]
Cargo expects `lib` to be table, not an array of tables (only single lib per project).
2015-06-08 15:42:33 -04:00
Mathieu David
5efdcf268a Updated with requested changes 2015-06-08 18:01:40 +02:00
diwic
33118eb17a Make all leaks safe in language reference
Since it was determined that no leaks were unsafe, some of the documentation is still not clear about this. Here's one example.
2015-06-07 23:14:01 +02:00
Chuck Bassett
675b3decad Update doctest in comments.md
For a user following the path of reading Chapter 5: Syntax & Symantics
prior to Chapter 4: Learn Rust, this will be the first time they have
encountered executable tests inside documentation comments.

The test will fail because the `add_one` function is not defined in
the context of the doctest. This might not be the optimal place to
introduce and explain the `/// #` notation but I think it is important
that this snippet pass as a test when `rustdoc --test` is run against
it if it is going to be shown.
2015-06-07 15:06:58 -04:00
bors
72b03e5337 Auto merge of #26047 - chuckSMASH:patch-1, r=alexcrichton
The sensible default used here for the version number in the
auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo
0.2.0-nightly efb482d).
2015-06-06 21:33:43 +00:00
Chuck Bassett
1826672c06 Updated Cargo.toml version number output
The sensible default used here for the version number in the
auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo
0.2.0-nightly).
2015-06-05 23:33:30 -04:00
bors
0b0c89efb3 Auto merge of #26032 - achiwhane:master, r=steveklabnik
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
2015-06-05 21:44:21 +00:00
Akshay Chiwhane
ac3301ec3b fix some errors 2015-06-05 09:56:42 -04:00
Akshay Chiwhane
455b93151d fix typo 2015-06-05 09:52:44 -04:00
Akshay Chiwhane
629be845fd edit for clarity and grammar 2015-06-05 09:50:27 -04:00
Akshay Chiwhane
f9bfebb790 Clarified naming convention for Cargo
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
2015-06-05 09:20:11 -04:00
Steve Klabnik
c0d8be4094 Rollup merge of #26011 - genodeftest:patch-1, r=steveklabnik 2015-06-05 11:20:28 +02:00
Steve Klabnik
f1dd27524a Rollup merge of #26010 - ranma42:improve-doc, r=steveklabnik
The statement is not completely exact, because it is valid to have
both 0 non-mutable references and 1 mutable reference. Instead, use
the same wording as in mutability.md.
2015-06-05 11:20:28 +02:00
Steve Klabnik
2bcb07933f Rollup merge of #25925 - azerupi:patch-4, r=steveklabnik
Hi

I added a little section in the for loops about the `enumerate()` function.
I think it's useful for beginners to know this function and how you can use it. 

I used the title loopcounter, but it's probably not the best word to describe it. So let me know if there is a better word :)
2015-06-05 11:20:28 +02:00
Christian Stadelmann
2abffd55db [Documentation: Macros] Use some more SSL 2015-06-04 15:53:22 +02:00
Christian Stadelmann
3c0165d59f [Documentation] Use SSL where possible 2015-06-04 15:44:30 +02:00
Andrea Canciani
2b13b45058 Minor fix to docs of constraints on mut/non-mut references
The statement is not completely exact, because it is valid to have
both 0 non-mutable references and 1 mutable reference. Instead, use
the same wording as in mutability.md.
2015-06-04 15:14:09 +02:00
Manish Goregaokar
fd3b6ca508 Fix doctest (fixup –#25900) 2015-06-04 11:26:31 +05:30
Manish Goregaokar
8c2806caae Rollup merge of #25900 - lorenzb:more_about_types, r=nikomatsakis
My main sources of information are [RFC401](https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md), the rust IRC channel, and a bunch of experiments to figure out what `rustc` currently supports.
Note that the RFC calls for some coercion behaviour that is not implemented yet (see #18469).
The documentation in this PR mostly covers current behaviour of rust and doesn't document the future behaviour. I haven't written about receiver expression coercion.

I would be happy to rewrite/adapt the PR according to feedback.

r? @steveklabnik
2015-06-04 10:07:02 +05:30
Steve Klabnik
5235065d74 Remove #[static_assert]
This was always a weird feature, and isn't being used in the compiler.
Static assertions should be done better than this.

This implements RFC #1096.

Fixes #13951
Fixes #23008
Fixes #6676

This is behind a feature gate, but that's still a

[breaking-change]
2015-06-03 09:38:13 -04:00
ben fleis
6a92cf9ace Add note about expression vs. statement to dining philosphers problem,
to address https://github.com/rust-lang/rust/issues/25488 .
2015-06-02 22:55:39 +02:00
Steve Klabnik
e1a33aa987 Link to cell in TRPL: mutability 2015-06-02 09:37:54 -04:00
Manish Goregaokar
98612dad9b Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik 2015-06-02 11:14:08 +05:30
Manish Goregaokar
04abc05094 Rollup merge of #25932 - bluss:doc-book-1, r=alexcrichton
trpl: Fix typo in Raw Pointers chapter
2015-06-02 11:14:08 +05:30
Manish Goregaokar
7da2228861 Rollup merge of #25751 - steveklabnik:translations, r=brson
/cc @kgv, @rust-kr, @KaiserY, @mkpankov
2015-06-02 11:14:07 +05:30
Tshepang Lekhonkhobe
09c6203ad6 booK: Float no longer exists 2015-06-02 06:22:01 +02:00
Tshepang Lekhonkhobe
dc99fdbd66 book: update error message 2015-06-02 06:22:01 +02:00
Tshepang Lekhonkhobe
37dd7a2494 book: some tiny improvements 2015-06-02 06:21:50 +02:00
Steve Klabnik
321c2f4f8c Add community translations. 2015-06-01 15:57:44 -04:00
Mathieu David
c4f42a1ab4 Added # let lines = "hello\nworld".lines(); to pass the tests 2015-06-01 21:34:31 +02:00
Paul Oliver
5fefae684a trpl: Use infinite iterator in chain example with take 2015-06-01 12:44:50 +02:00
bors
baf508ba20 Auto merge of #25924 - FuGangqiang:master, r=Gankro 2015-06-01 04:57:00 +00:00
bors
02e4c4b8c8 Auto merge of #25911 - olombard:borrowing-link, r=alexcrichton
r? @steveklabnik
2015-05-31 21:40:47 +00:00
Mathieu David
90057c2962 output code language to text 2015-05-31 23:37:22 +02:00
Ulrik Sverdrup
6cb061721c trpl: Fix typo in Raw Pointers chapter 2015-05-31 22:35:59 +02:00
Mathieu David
151c3d3644 Corrected some formatting issues 2015-05-31 20:56:35 +02:00
Steve Gury
bef936111d Update iterators.md
Fix the actual off by one
2015-05-31 10:24:30 -07:00
Steve Gury
4425422bdd Fix off by one in the iterator documentation
`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)
2015-05-31 07:32:21 -07:00
Mathieu David
6e2f18ef32 Add loopcounter section to the for-loop chapter
Sometimes loop counters are useful and we should show new users how it is achieved in Rust.
2015-05-31 14:03:57 +02:00
FuGangqiang
bdef7faaba trpl:add missing comma 2015-05-31 18:16:58 +08:00
olombard
61207046de TRPL: Fix a broken link to 'borrowing' 2015-05-30 23:43:23 +02:00
bors
78c4d53871 Auto merge of #25882 - steveklabnik:gh25554, r=alexcrichton
Fixes #25554
2015-05-30 21:10:07 +00:00
frankamp
ee4b58c792 Fixes consistency in before/after example
The doc indicates that you can replace 'before' with 'after' showing the use of try!. The two examples should be equivalent, but they are not.

In the File::create we were inducing a panic before in case of error, not propagating. It is important for newbies (like myself) to understand that try! propagates failures, while unwrap can induce a panic.

The other alternative is to make the 'before' File::create also manually handle Err like the other calls. Either way it would be consistent.
2015-05-30 13:31:46 -07:00
Lorenz
babb2684d8 Extend rust reference with a section about type coercions 2015-05-30 14:26:50 +02:00
Lorenz
a2b61e16b1 Extend rust reference with a section about subtyping 2015-05-30 14:25:58 +02:00
Mathieu David
5d8e085369 Proposal to explain the copy trait more clearly
As mentioned in #25893 the copy trait is not very well explained for beginners. There is no clear mention that all primitive types implement the copy trait and there are not a lot of examples. 

With this change I try to make it more visible and understandable for new users. 

I myself have struggled with this, see [my question on stackoverflow](http://stackoverflow.com/questions/30540419/why-are-booleans-copyable-even-though-the-documentation-doesnt-indicate-that). And I want to make it more transparent for others. 

I filed issue #25893 but I thought that I could give it a shot myself to relieve some of the work from the devs :)

If it is not well written or there are some changes to be made before it can be merged, let me know.

Cheers,
Mathieu
2015-05-30 11:51:25 +02:00
Steve Klabnik
ed19a6e034 Rollup merge of #25886 - nhowell:patch-1, r=steveklabnik
r? @steveklabnik
2015-05-29 15:24:47 -04:00
Steve Klabnik
253fb5bd8b Rollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton
Fixes #25417
2015-05-29 15:24:47 -04:00
Steve Klabnik
c2a5d31f30 Rollup merge of #25866 - jooert:update_guidelines, r=steveklabnik
So that rust-guidelines can be deleted and src/doc/style can prosper as the official home of the rust guidelines. 😃
2015-05-29 15:24:47 -04:00
Steve Klabnik
c7b1f37c59 Rollup merge of #25865 - azerupi:patch-2, r=alexcrichton
"workd" corrected to "world"
2015-05-29 15:24:46 -04:00
Steve Klabnik
5d2af1c724 Rollup merge of #25864 - azerupi:patch-1, r=alexcrichton
There was no opening parenthesis for this closing parenthesis...
2015-05-29 15:24:46 -04:00
Steve Klabnik
e9e2a11a6a Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik
r? @steveklabnik
2015-05-29 15:24:46 -04:00
Nick Howell
81a413bb01 trpl: eight sections, not seven 2015-05-29 14:29:35 -04:00
Steve Klabnik
5e941877fe Add syntax for multiple lifetimes
Fixes #25417
2015-05-29 12:52:02 -04:00
Steve Klabnik
b218470b4d Make note about $ more prominent.
Fixes #25554
2015-05-29 12:20:32 -04:00
bors
2d447e40e2 Auto merge of #25857 - killercup:patch-14, r=steveklabnik
Thanks to @cers who reported this in killercup/trpl-ebook#14!

r? @steveklabnik
2015-05-29 14:53:59 +00:00
bors
3a433b968b Auto merge of #25854 - liigo:patch-1, r=alexcrichton 2015-05-29 11:46:08 +00:00
Nils Liberg
adac861db2 Fix link to newtypes page 2015-05-29 01:02:24 +02:00
Nils Liberg
d0744ba3e7 Fix mistake: "to to" -> "to" 2015-05-29 01:02:24 +02:00
David Campbell
31a007af19 remove extra space from "over" code as well 2015-05-29 01:02:24 +02:00
David Campbell
4d90b4d9b8 Update let.md -- follow whitespace style guideline
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."
2015-05-29 01:02:24 +02:00
Corey Farwell
06706510cb Make adjancent code examples more similar 2015-05-29 01:02:24 +02:00
David Campbell
19cb2a7707 add newline before list in functions-and-methods
The current version of hoedown treats lists interrupting paragraphs in the Markdown.pl style rather than CommonMark, so a newline is needed for the list to be rendered properly.
2015-05-29 01:02:24 +02:00
Mathieu David
15aeea5477 Corrected typo
"workd" corrected to "world"
2015-05-29 00:43:39 +02:00
Mathieu David
15ab481322 removed lonely closing parenthesis
There was no opening parenthesis for this closing parenthesis...
2015-05-28 23:47:27 +02:00
bors
621a10e7f3 Auto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton
This is now std::io::Result
2015-05-28 17:34:30 +00:00
Steve Klabnik
16a47c2d91 remove references to IoResult
This is now std::io::Result
2015-05-28 12:51:01 -04:00
bors
9c303944a7 Auto merge of #25835 - steveklabnik:gh25438, r=alexcrichton
Fixes #25438
2015-05-28 15:29:15 +00:00
Pascal Hertleif
2a63cc7715 TRPL: Fix Unescaped URL 2015-05-28 16:18:26 +02:00
bors
4233cbda8a Auto merge of #25849 - reinh:patch-1, r=huonw
Thanks for the awesome book!

r? @steveklabnik
2015-05-28 11:24:38 +00:00
Liigo Zhuang
d061a0f8d5 floating-point types are machine types, not machine-dependent types 2015-05-28 18:11:32 +08:00
bors
4f66d881a5 Auto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonw 2015-05-28 09:20:49 +00:00
Rein Henrichs
23ec00751e TRPL: fix typo, borow for borrow 2015-05-27 22:35:46 -07:00
Jake Goulding
a959cc435f Remove mentions of int / uint from public documentation 2015-05-27 19:26:18 -04:00
Steve Klabnik
1cede0b0ef Fix section headers on Not Found page
Fixes #25794
2015-05-27 19:15:17 -04:00
Steve Klabnik
4db7e56b01 Small wording fix in TRPL: lifetimes
Fixes #25438
2015-05-27 15:02:42 -04:00
bors
e4c64a1499 Auto merge of #25713 - Stebalien:pattern, r=alexcrichton
Needed to support:

```rust
match X {
  pattern if Y ...
}

for pattern in Y {}
```

IMO, this shouldn't require an RFC because it can't interfere with any future language changes (because `pattern if` and `pattern in` are already legal in rust) and can't cause any ambiguity.
2015-05-27 00:42:55 +00:00
Max Jacobson
16334e508e Add a missing space to the Glossary page of TRPL
r? @steveklabnik
2015-05-25 22:40:07 -04:00
bors
cc156c2f38 Auto merge of #25771 - killercup:trpl/cleanup-markdown-links, r=steveklabnik
In all other places the IDs of link references are without spaces (and explicitly set).

These are just some cleanups I did for the PDF version.

r? @steveklabnik
2015-05-25 21:28:51 +00:00
bors
6770253c67 Auto merge of #25742 - thombles:tk/StringCoercion, r=steveklabnik
A few of us [over on the forum](https://users.rust-lang.org/t/string-type-coercion-in-rust/1439) have been tripped up by this distinction, which I don't think is mentioned. It's kind of logical if you read the "Deref coercions" page and squint a bit but I think it would be nice to explain it directly. Here's one way we could clarify it.
2015-05-25 18:18:11 +00:00
Pascal Hertleif
6bb56b4fa7 TRPL: Clean up some Markdown links
In all other places the IDs of link references are without spaces (and
explicitly set).
2015-05-25 15:10:50 +02:00
Thomas Karpiniec
2b3354cbf8 book: add no_run and use statement to strings no-coercion example 2015-05-25 18:38:17 +10:00
Alex Stokes
c7f92018ac Fix typo in diagram demonstrating stack vs. heap values 2015-05-24 15:18:43 -07:00
bors
820b1d8393 Auto merge of #25464 - zaeleus:trpl-riol, r=pnkfelix
r? @steveklabnik
2015-05-24 15:52:17 +00:00
Thomas Karpiniec
49597fcbf2 book: explanation that String -> &str coercion doesn't happen for &str traits 2015-05-24 13:54:05 +10:00
Oliver Schneider
962b132fe3 Rollup merge of #25715 - nero-luci:patch-1, r=steveklabnik
I consider that this version has a better reading fluency, instead of having a period between clauses
2015-05-23 19:03:19 +02:00
Oliver Schneider
691c75a54f Rollup merge of #25695 - mbrubeck:reference, r=brson
r? @steveklabnik
2015-05-23 19:03:18 +02:00
Oliver Schneider
0c74a73bd5 Rollup merge of #25681 - steveklabnik:gender, r=nmatsakis
Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well.

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643
2015-05-23 19:03:18 +02:00
Cornel Punga
18dfa80985 Update guessing-game.md
I consider that this version has a better reading fluency, instead of having a period between clauses
2015-05-22 21:55:50 +03:00
Steven Allen
f21655ec02 Allow patterns to be followed by if and in.
Needed to support:

match X {
  pattern if Y ...
}

for pattern in Y {}
2015-05-22 12:47:52 -04:00
Matt Brubeck
54b1608b2d Document the debug_assertions cfg option 2015-05-21 16:34:26 -07:00
bors
c3d60aba6c Auto merge of #25669 - GuillaumeGomez:typo-fix, r=Manishearth
r? @steveklabnik
2015-05-21 19:41:18 +00:00
Guillaume Gomez
86a821e5d1 Replace "more later" by "later" 2015-05-21 20:30:15 +02:00
bors
7044f4a394 Auto merge of #25601 - ericye16:master, r=steveklabnik 2015-05-21 17:01:51 +00:00
Steve Klabnik
65ead717a7 she -> they in Dining Philosophers
Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well.

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643
2015-05-21 11:53:45 -04:00
bors
59ba55ddbd Auto merge of #25473 - doomrobo:patch-3, r=steveklabnik
Added `Deref` to the "Special Traits" section
2015-05-21 15:24:16 +00:00
dmgawel
e30c6d131f Introduction vector example elements counting fix
Earlier created vector `["Hello", "world"]` has two elements and we try to add a third element.
2015-05-21 14:30:32 +02:00
Manish Goregaokar
06d343b691 Rollup merge of #25665 - OlegTsyba:fix_documentation, r=Gankro
fix a small typo in the official tutorial. "coerce" instead of "coerece"
r? @steveklabnik
2015-05-21 13:38:26 +05:30
Manish Goregaokar
1fb2102498 Rollup merge of #25661 - Stebalien:macro, r=Gankro
They don't have to be followed by anything.
2015-05-21 13:38:26 +05:30
OlegTsyba
c5c508621d Fix the typo in The Rust Programming Language book, 5.18. Strings 2015-05-21 01:40:23 +03:00
Steven Allen
74fadfaeea Change "must" to "may only" in macro future proofing rules.
They don't have to be followed by anything.
2015-05-20 17:19:57 -04:00
Iven Hsu
2ca3dfd4ac
trpl: Remove tailing semicolon of an inner attribute
The syntax with tailing semicolon is deprecated and the compiler will
complain about it.
2015-05-20 16:55:38 +08:00
Steve Klabnik
7f74212906 Rollup merge of #25607 - peferron:doc-macros-assert-fix, r=steveklabnik
"Truth passes, success `panic!`s" seems to be a typo. The closest fix would be something like "Success passes, failure `panic!`s" but to me a "comparison failure" suggests that we couldn't compare the two values at all, not that we could successfully compare them and that the result was non-equality. So I opted to rewrite the paragraph a bit. If there's a better alternative please let me know.

r? @steveklabnik
2015-05-19 18:38:54 -04:00
Steve Klabnik
1d961fde2d Rollup merge of #25604 - skeuomorf:docs-lifetime, r=steveklabnik
r? @steveklabnik
2015-05-19 18:38:53 -04:00
Erik Michaels-Ober
b748c2e90d Change default gender in the dining philosophers project
The paper from which this example was taken made the mistake of assuming
that all five philosophers are men. This is a hypothetical
example--there are no actual philosophers eating spaghetti--so there is
no good reason to make this assumption. Since women make up about half
of the human population, all things being equal, women should represent
about half of the philosophers. However, because this mistake has stood
since 1985, I have changed *all* of the pronouns to be female, to make
up for lost time. If someone would like to revert this patch or switch
to neutral pronouns after 30 years, feel free to set your alarm clock
for 2045.
2015-05-19 22:38:24 +02:00
peferron
afbe15d103 Fix description of assert! 2015-05-19 07:56:29 -07:00
Manish Goregaokar
b613ef552d Rollup merge of #25580 - killercup:trpl/unify-code-blocks, r=steveklabnik
This adds strictly more information to the source files and reduces the need for customized tooling to render the book. (While this should not change the output of _rustbook_, it is very useful when rendering the sources with external tools like Pandoc.)

This only adds the language marker to "first level" code blocks (and not to code blocks in comments inside of code examples).

r? @steveklabnik
2015-05-19 18:47:15 +05:30
Manish Goregaokar
02b79c4763 Rollup merge of #25575 - clatour:patch-2, r=steveklabnik
Looks like this was an issue in the source material. I've let the editor know and he has told me he is correcting it there as well.

r? @steveklabnik
2015-05-19 18:47:14 +05:30
Manish Goregaokar
392576b6d8 Rollup merge of #25512 - peferron:doc-traits-error-fix, r=alexcrichton
The source code snippet uses `"whatever".as_bytes()` but the compilation error message uses `b"whatever"`. Both should be consistent with each other.

r? @steveklabnik
2015-05-19 18:47:13 +05:30
Manish Goregaokar
fddd89319d Rollup merge of #25452 - jimblandy:master, r=steveklabnik
Minor tweak: the text explaining the Borrow trait talks about slices, but the example immediately following just uses a simple reference; there are no slices involved.

r? @steveklabnik
2015-05-19 18:47:13 +05:30
Mohammed Attia
aa570bce3e Fix lifetimes trpl typo 2015-05-19 14:38:54 +02:00
Eric Ye
4bc8853cea fix footnote link 2015-05-19 07:46:52 -04:00
Pascal Hertleif
f3adea5ce9 TRPL: Normalize rust Code Block Markers
`{rust,ignore}` -> `rust,ignore
2015-05-18 21:10:00 +02:00
Pascal Hertleif
6f69cd6387 TRPL: Add rust Marker to Some Code Block
This adds strictly more information to the source files and reduces the
need for customized tooling to render the book.

(While this should not change the output of _rustbook_, it is very
useful when rendering the sources with external tools like Pandoc.)
2015-05-18 20:56:00 +02:00
Michael Macias
5a1e6df07c trpl: Proofread "Rust Inside Other Languages" 2015-05-18 13:09:21 -05:00
clatour
83df71d6c5 trpl: Dining philosophers backstory typo
Minor typo/grammar error.
2015-05-18 11:41:59 -06:00
peferron
a10d243dd4 Use byte string literal syntax
The byte string literal syntax `b"whatever"` is more idiomatic than
`"whatever".as_bytes()`.
2015-05-17 21:19:12 -07:00
Manish Goregaokar
252027768e Rollup merge of #25530 - peferron:doc-closures-whitespace-fix, r=alexcrichton
Tiny fixes collected while reading through the Rust book. If they're too nitpicky please let me know and I'll ignore the next ones. :)

The spaces after the function and closure arguments might be intentional, but they do not make much sense: the usual formatting doesn't have such spaces, and they aren't helping align the three lines together either.

r? @steveklabnik (as suggested by [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md))
2015-05-18 08:55:38 +05:30
Manish Goregaokar
6f2a069b9c Rollup merge of #25526 - chellmuth:patch-1, r=alexcrichton 2015-05-18 08:55:37 +05:30
peferron
82447cf500 Fix doc whitespace issues 2015-05-17 03:00:04 -07:00
Chris Hellmuth
09a473ea7b Fix typo in references-and-borrowing docs 2015-05-17 00:19:53 -07:00
Manish Goregaokar
1fd0a8455b Rollup merge of #25506 - Wilfred:master, r=alexcrichton
Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.
2015-05-17 11:55:39 +05:30
Manish Goregaokar
094d29cf09 Rollup merge of #25493 - coffeejunk:update_installed_rust_version, r=alexcrichton
Rust is out of beta 🎉 

r? @steveklabnik
2015-05-17 11:55:39 +05:30
Manish Goregaokar
b40fcf5b10 Rollup merge of #25490 - huachaohuang:patch-1, r=alexcrichton 2015-05-17 11:55:39 +05:30
Manish Goregaokar
4d3db38940 Rollup merge of #25484 - sumito3478:fix-deadlink-in-complement-lang-faq, r=alexcrichton
In "The Rust Language FAQ", some of the links to example projects/modules written in Rust are dead links. This PR updates them.
2015-05-17 11:55:38 +05:30
Manish Goregaokar
a25925a3d4 Rollup merge of #25472 - WillEngler:book-tiny-typo-fixes, r=alexcrichton
This PR fixes two little typos in the Dining Philosophers example.

Also, there are two style points that may have been oversights but may have been deliberate, so I'll just bring them up here:

1) In the last paragraph, you say

> You’ll notice we can introduce a new binding to `table` here, and it will shadow the old one. This is often used so that you don’t need to come up with two unique names.

You already said something similar to this in the Guessing Game, but maybe you intended for this example to be independent of that one.

2) In "Rust Inside Other Languages," you introduce the idea of the "global interpreter lock" and then refer to it as the GIL a few paragraphs later without explicitly stating that GIL == global interpreter lock. It's reasonable to expect readers to make the connection, but maybe that's not what you intended.

Excellent work on the examples! Congrats on 1.0!

r? @steveklabnik
2015-05-17 11:55:38 +05:30
peferron
55c8bacc3a Make error message consistent with source code
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
2015-05-16 17:01:25 -07:00
Wilfred Hughes
ba02739ad3 Avoid calling a variable 'string' when discussing strings.
Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.
2015-05-16 23:56:45 +01:00
bors
2da9efefca Auto merge of #25463 - jeremyschlatter:master, r=alexcrichton 2015-05-16 22:29:56 +00:00
Maximilian Haack
e095e3963e Update windows install links to 1.0
Fixes #25489
2015-05-16 19:18:52 +02:00
Maximilian Haack
76fa4f427b Update the shown installed rust version to 1.0
🎉 🎉 🎉
2015-05-16 17:20:07 +02:00
Huachao Huang
6e8e6a4b08 Update rust-inside-other-languages.md 2015-05-16 21:44:02 +08:00
sumito3478
f641bd8396 Fix deadlinks in complement-lang-faq.md 2015-05-16 18:06:22 +09:00
bors
0becf6aec7 Auto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton
Fix the link to the "static initialization order fiasco" discussion in the C++ Frequently Questioned Answers.

At present the link points to a mail message summarizing the decision not to have resumable exceptions, but the FAQ means to refer to a discussion of the "static initialization order fiasco". I've made my best guess at what it meant to refer to.
2015-05-16 08:37:31 +00:00
bors
15c18e725c Auto merge of #25450 - dnaeon:docs, r=alexcrichton 2015-05-16 07:01:32 +00:00
bors
4ce08a5d70 Auto merge of #25440 - durka:patch-3, r=alexcrichton
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-16 02:11:11 +00:00
Michael Rosenberg
d3ac395dcc Update reference.md
Added `Deref` to the "Special Traits" section
2015-05-15 22:07:20 -04:00
Will Engler
d5394d00d1 Correct two small typos in the Dining Philosophers example. 2015-05-15 19:32:13 -06:00
Jeremy Schlatter
3709e8f92b Fix quotation mark in ruby example. 2015-05-15 16:08:15 -07:00
bors
daaf715539 Auto merge of #25432 - killercup:patch-12, r=steveklabnik
`[let]` was already defined in line 11. Pandoc shows a warning for this. I'm not sure if it's actually invalid Markdown.

r? @steveklabnik
2015-05-15 22:55:03 +00:00
bors
a9ea33fa30 Auto merge of #25437 - MazinZ1:master, r=alexcrichton
The download links of Windows installers on the Nightly Rust page are using beta builds instead of nightly builds, which caused some confusions when I was setting up my env. Probably it's better to use the links of nightly builds here.
2015-05-15 21:17:42 +00:00
Jim Blandy
0b04b17183 Make description of Borrow trait uses match the example. 2015-05-15 12:44:24 -07:00
Marin Atanasov Nikolov
92e44b0422 docs: Typo fix 2015-05-15 21:46:59 +03:00
Alex Burka
900f27dc7c trpl: change from "int" to "i32" in Traits
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-15 12:14:39 -04:00
Z1
26560e75b7 Fix download links of Nightly Windows installers
The download links of Windows installers on the Nightly Rust page are using beta builds instead of nightly builds, which caused some confusions when I was setting up my env. Probably it's better to use the links of nightly builds here.
2015-05-15 10:52:47 -04:00
bors
13a4b83c1a Auto merge of #25402 - parir:master, r=Manishearth
r? @steveklabnik
2015-05-15 13:35:49 +00:00
Pascal Hertleif
94be1153f1 TRPL: Fix Inline Code Typography 2015-05-15 14:42:58 +02:00
Pascal Hertleif
7d0ae692c9 TRPL: Remove Duplicate Reference
Pandoc shows a warning for this. I'm not sure if it's actually invalid Markdown.
2015-05-15 12:23:26 +02:00