Commit graph

3950 commits

Author SHA1 Message Date
Nick Cameron
e6cc4c5d13 Fix links 2016-08-18 15:43:35 +12:00
Jonathan Turner
eb91d33a14 Rollup merge of #35681 - Rufflewind:patch-1, r=apasel422
Fix spacing in code of closures.md

The spacing seems inconsistent with existing style conventions.
2016-08-17 06:25:26 -07:00
Jonathan Turner
ea09b7d8c6 Rollup merge of #35663 - CryZe:no-stdlib, r=Manishearth
Improve `No stdlib` and related Documentation

This renames all lang item function names to the ones used in `libstd` and `libpanic_unwind`. It also explains the `eh_unwind_resume` lang item in the `libcore` documentation, where it was missing. A third function is also needed on certain compilation targets, so this was also added to the `No stdlib` documentation.
2016-08-17 06:25:25 -07:00
Jonathan Turner
b8859f6956 Rollup merge of #35595 - urschrei:associated_types_docfix, r=steveklabnik
Clarify type declaration language in Associated Types docs

A small fix for the Associated Types docs

r? @steveklabnik
2016-08-17 06:25:23 -07:00
Jonathan Turner
e83bff90ff Rollup merge of #34370 - steveklabnik:keyword-ref-mention, r=Manishearth
A disclaimer about keywords.

Some people cite this list as "zomg Rust has so many keywords," so make
it clear that these aren't all used by the language today.
2016-08-17 06:25:22 -07:00
Steve Klabnik
85bbbad592 A disclaimer about keywords.
Some people cite this list as "zomg Rust has so many keywords," so make
it clear that these aren't all used by the language today.
2016-08-15 10:52:42 -04:00
Phil Ruffwind
9e3986188d Fix spacing in code of closures.md
The spacing seems inconsistent with existing style conventions.
2016-08-15 09:39:13 -04:00
Eduard-Mihai Burtescu
c63adb1712 Rollup merge of #35647 - ahmedcharles:spelling, r=alexcrichton
Ensure that attributes are spelled properly.
2016-08-14 20:29:53 +03:00
Christopher Serr
e586d2174b Improve No stdlib and related Documentation 2016-08-14 13:33:53 +02:00
Ahmed Charles
6fbff4f06a Ensure that attributes are spelled properly. 2016-08-13 02:41:43 -07:00
Christophe Vu-Brugier
3042fba44c book: fix the hidden find() functions in error-handling.md
The hidden find() functions always returns None. Consequently, one of the
examples using find() prints "No file extension found" instead of
"File extension: rs" which is the expected output.

This patch fixes the issue by implementing find() with std::str::find().

Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
2016-08-12 14:49:16 +02:00
Stephan Hügel
31da7f6f25 More clarification 2016-08-11 20:37:26 +02:00
Stephan Hügel
2ed052d82f Clarify type declaration language 2016-08-11 20:05:05 +02:00
Jonathan Turner
3d2d5c4c0f Rollup merge of #35466 - xitep:master, r=steveklabnik
book: fix formatting of module layout example
2016-08-08 13:25:57 -07:00
Jonathan Turner
39a26c59ef Rollup merge of #35465 - cardoe:pattern-book-update, r=steveklabnik
book: update example patterns to be more clear

When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
2016-08-08 13:25:57 -07:00
Doug Goldstein
18565c63db
book: update example patterns to be more clear
When using Point { x: 0, y: 0 } and showing pattern matching decomposing
x and y individually its hard to understand. By using a different value
for x and a different value for y it is more clear.
2016-08-08 11:10:44 -05:00
Novotnik, Petr
98c6770a23 Fix formatting of module layout example 2016-08-07 17:44:47 +02:00
ubsan
7c1bb9ae0d Finish fixing the operator precedence tables
Add the unstable `:` colon and `<-` inplace operators.
2016-08-06 23:57:18 -07:00
Guillaume Gomez
6597a28144 Rollup merge of #35324 - ubsan:precedence, r=steveklabnik
Fix precedence table in reference

Adds `..` and `...` and puts them above `=`

r? @steveklabnik
2016-08-05 16:12:59 +02:00
Guillaume Gomez
6e5e7e2ea0 Rollup merge of #35189 - mLuby:patch-1, r=steveklabnik
Update the-stack-and-the-heap.md

Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-05 16:12:55 +02:00
Guillaume Gomez
7971a93698 Rollup merge of #35137 - jongiddy:explicit-wildcard, r=steveklabnik
Provide more explicit example of wildcard version in guessing game doc.

Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
2016-08-05 16:12:54 +02:00
ubsan
76babf9c8e Fix precedence table in reference 2016-08-04 13:28:24 -07:00
mLuby
d90c16625f Update the-stack-and-the-heap.md
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-02 14:08:19 -07:00
Eduard Burtescu
b583711ff9 Ignore the lang-items example in the book. 2016-08-02 09:02:19 +03:00
Jonathan Giddy
b77b9b72fe Provide more explicit example of wildcard version in guessing game doc.
Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
2016-07-31 12:44:41 +01:00
bors
1225e122fd Auto merge of #34904 - petrochenkov:rustcall, r=nikomatsakis
Properly feature gate all unstable ABIs

Fixes https://github.com/rust-lang/rust/issues/34900
[breaking-change]
r? @pnkfelix

---
Function-visiting machinery for AST/HIR is surprisingly error-prone, it's *very* easy to miss some cases or visit something twice while writing a visitor. This is the true problem behind https://github.com/rust-lang/rust/issues/34900. I'll try to restructure these visitors a bit and send one more PR later.
2016-07-30 15:58:20 -07:00
Guillaume Gomez
5f5fdf64f1 Rollup merge of #35103 - brettcannon:patch-1, r=Manishearth
Try to clear up some awkward wording
2016-07-29 11:57:54 +02:00
Brett Cannon
3563e400cc Try to clear up some awkward wording 2016-07-28 19:02:25 -07:00
Alex Burka
29546dd06d remove claim about searching through nested fields for the nullable type, even though that is how it works 2016-07-27 13:58:51 -04:00
Alex Burka
1319b293c6 fix typo 2016-07-27 13:58:51 -04:00
Alex Burka
8e7abea93e revert libc changes 2016-07-27 13:58:51 -04:00
Alex Burka
54ecc210ec hack to make example compile 2016-07-27 13:58:51 -04:00
Alex Burka
5276b29670 change confusing wording about discriminant 2016-07-27 13:58:51 -04:00
Alex Burka
fae3335272 extern fns require named parameters
Not sure the example is going to stay, but I can try to pass Travis for the bragging rights.
2016-07-27 13:58:51 -04:00
Alex Burka
1cceca8dfd foreign function interface interface 2016-07-27 13:58:51 -04:00
Alex Burka
0016af5f13 not just a single field 2016-07-27 13:58:51 -04:00
Alex Burka
84366b6f28 recursion 2016-07-27 13:58:51 -04:00
Alex Burka
cc2fc48dec expand nullable pointer example 2016-07-27 13:58:51 -04:00
Alex Burka
48ce20653a generics-agnostic description 2016-07-27 13:58:51 -04:00
Alex Burka
032ea41e99 book/ffi: nullable pointer, libc cleanups
Expand the "nullable pointer optimization" section with a code example.

Change examples to use std::os::raw instead of libc, when applicable.
2016-07-27 13:58:51 -04:00
Steve Klabnik
d64de045c9 Rollup merge of #35043 - rahiel:patch-1, r=nikomatsakis
doc/book/trait-objects: remove empty lines at start of examples

I think it looks better without them.
2016-07-26 17:21:14 -04:00
Steve Klabnik
96108bbb94 Rollup merge of #34990 - abhijeetbhagat:patch-3, r=steveklabnik
Update underscore usage (#34903)
2016-07-26 17:21:12 -04:00
Steve Klabnik
a56741f832 Rollup merge of #34850 - tshepang:patch-3, r=steveklabnik
doc: add missing pause
2016-07-26 17:21:11 -04:00
Steve Klabnik
493cb979c6 Rollup merge of #34461 - ubsan:master, r=steveklabnik
Fix ABI string docs in reference.md
2016-07-26 17:21:10 -04:00
Rahiel Kasim
47db8deff6 doc/book/trait-objects: remove empty lines at start of examples 2016-07-26 11:14:46 +02:00
abhi
6ebe6e8f80 Update underscore usage (#34903) 2016-07-23 13:15:09 +05:30
Tshepang Lekhonkhobe
b0de62064c doc: add missing pause 2016-07-21 21:11:34 +02:00
Guillaume Gomez
9ba1792aac Rollup merge of #34880 - xitep:master, r=steveklabnik
Make .enumerate() example self-explanatory

Should resolve #34624
2016-07-21 11:27:00 +02:00
Vadim Petrochenkov
9292c0bc91 Properly feature gate all unstable ABIs 2016-07-18 22:51:18 +03:00
Ximin Luo
8aaf0f894b doc/book: fix tests for non-x86 architectures, such as aarch64
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
2016-07-17 21:00:24 +02:00