Geoffrey Thomas
457aed7ca0
trpl: move tuple-structs.md into structs.md
2015-05-12 20:21:19 -04:00
Steve Klabnik
2ba61698cc
TRPL: dining philosophers
2015-05-12 19:30:48 -04:00
Steve Klabnik
fc6372ea1f
TRPL: Rust inside other languages
2015-05-12 18:26:03 -04:00
Steve Klabnik
9a3e98be1c
TRPL: Drop
2015-05-12 15:10:44 -04:00
Steve Klabnik
0ad15bbc2b
TRPL: release channels
2015-05-12 15:09:17 -04:00
Manish Goregaokar
25815655c0
Rollup merge of #25335 - nikomatsakis:updates-to-reference-manual, r=steveklabnik
...
I did a read through of the manual. This commit corrects various small points and expands some sections, while avoiding too much detail.
r? @steveklabnik
2015-05-12 22:57:54 +05:30
Manish Goregaokar
398148193b
Rollup merge of #25331 - michaelsproul:err-idx-doc-link, r=Manishearth
...
At the moment, http://doc.rust-lang.org/error-index.html isn't linked to from anywhere (except Reddit). This should allow search engines to find error codes!
I also capitalised "The Standard Library" and neatened a few bits of grammar.
Also fixed: `#[main]` inside one of the error descriptions.
2015-05-12 22:57:53 +05:30
Manish Goregaokar
e216057dac
Rollup merge of #25322 - frewsxcv:patch-23, r=steveklabnik
...
`if` can be a statement or also an expression.
2015-05-12 22:57:52 +05:30
Manish Goregaokar
e91d272fbb
Rollup merge of #25221 - michal-czardybon:master, r=steveklabnik
...
I corrected some pretty obvious textual mistakes. One thing requires more attention - the paragraph at line 133 in Ownership. It was confusing, so I changed it, but I am no sure if this is what the author had in mind.
2015-05-12 22:57:52 +05:30
Manish Goregaokar
bea12a9998
Rollup merge of #25220 - brson:doc1, r=steveklabnik
2015-05-12 22:57:52 +05:30
Niko Matsakis
393a37ecbd
Correct various small points, expand some sections, while avoiding
...
too much detail.
2015-05-12 12:02:39 -04:00
Shmuale Mark
a22b3270b8
book: typo fixes, wording improvements.
...
The text in iterators.md wasn't wrong, but it read awkwardly to my ear.
2015-05-12 11:58:07 -04:00
Steve Klabnik
e780fb270c
TRPL: Borrow and AsRef
...
These two traits are commonly confused. As such, explain the difference.
Fixes #24163
2015-05-12 10:53:50 -04:00
Michael Sproul
6faa8d6793
Add a link to the error index to the main doc page.
...
I also capitalised "The Standard Library" and neatened a few bits of grammar.
Also fixed: `#[main]` inside one of the error descriptions.
2015-05-12 21:21:26 +10:00
Corey Farwell
d13f765be8
Make mention of if
more generic
...
`if` can be a statement or also an expression.
2015-05-12 00:33:22 -04:00
Steve Klabnik
28b923c477
Rollup merge of #25314 - steveklabnik:static_to_associated, r=alexcrichton
2015-05-11 23:24:20 -04:00
Steve Klabnik
f3849431a9
Rollup merge of #25304 - oli-obk:patch-2, r=steveklabnik
2015-05-11 23:24:20 -04:00
Steve Klabnik
425455b18e
Rollup merge of #25292 - steveklabnik:stack_and_heap, r=nikomatsakis
...
I think someday I'd like to make these drawings rather than text, but for now, this will have to be good enough.
2015-05-11 23:24:19 -04:00
Steve Klabnik
adf5b84394
Rollup merge of #25283 - steveklabnik:gh24999, r=alexcrichton
...
and remove references to the unit type, which no longer exists
Fixes #24999
2015-05-11 23:24:19 -04:00
Steve Klabnik
f8df5ea8a7
Rollup merge of #25282 - badboy:reference-macro-1, r=alexcrichton
...
As mentioned in https://github.com/rust-lang/rust/issues/16676#issuecomment-100676326 this makes it a little bit more correct.
I'm a bit unsure whether or not it should be explained that the transcriber can be wrapped in parentheses or curly braces if necessary.
2015-05-11 23:24:18 -04:00
Steve Klabnik
42240dccb6
static method -> associated function
2015-05-11 18:22:49 -04:00
Steve Klabnik
e66653bee5
TRPL: the stack and the heap
2015-05-11 16:18:12 -04:00
Steve Klabnik
dd7d0f5e9c
Fix links in the referece
...
and remove references to the unit type, which no longer exists
Fixes #24999
2015-05-11 12:49:17 -04:00
Oliver Schneider
7dd7bea3ac
trpl: item macros must be followed by a semicolon
2015-05-11 16:46:24 +02:00
Manish Goregaokar
2b0191e6d5
Rollup merge of #25297 - carols10cents:grammar-todos, r=steveklabnik
...
Hiiii, I've got another chunk of updates to the grammar documentation! ⭐ 🌟 🌠
Chipping away at #22445 , still have some more to go. I'm learning so much!!!
2015-05-11 19:58:58 +05:30
Manish Goregaokar
dec422541b
Rollup merge of #25291 - johannhof:let-expressions-example, r=steveklabnik
...
Maybe it's me, but I really needed an example to understand if let and refutable statements.
Playpen: http://is.gd/mjX3Gf
Let me know if the variable names are too, uh, culinary.
2015-05-11 19:58:57 +05:30
Manish Goregaokar
f2c2736cd8
Rollup merge of #25290 - bluss:docfixes, r=steveklabnik
...
Several Minor API / Reference Documentation Fixes
- Fix a few small errors in the reference.
- Fix paper cuts in the API docs.
Fixes #24882
Fixes #25233
Fixes #25250
2015-05-11 19:58:57 +05:30
Manish Goregaokar
8f01d8d7c2
Rollup merge of #25287 - petehunt:patch-2, r=steveklabnik
2015-05-11 19:58:57 +05:30
Manish Goregaokar
1b8f52bb69
Rollup merge of #25286 - johannhof:patch-1, r=steveklabnik
...
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.
For the changed example see http://is.gd/28ak9E
Also fixed a minor grammar issue.
2015-05-11 19:58:57 +05:30
Manish Goregaokar
b0b6db6cb3
Rollup merge of #25284 - petehunt:patch-1, r=steveklabnik
...
Noticed this while perusing the docs
2015-05-11 19:58:56 +05:30
bors
8004fc9fe0
Auto merge of #25277 - polachok:docfix, r=steveklabnik
...
r? @steveklabnik
2015-05-11 12:07:39 +00:00
Michał Czardybon
bff170786c
Fixed one textual mistake and one casing error.
...
Corrected "Ownership":
- [`Variable bindings`] link was not processed properly.
- Changed the paragraph about move semantics with two vectors, because it was confusing.
- Removed "So it may not be as inefficient as it initially seems", because there is nothing that seems inefficient in copying pointers only.
- Other text corrections.
Fixed copied-and-pasted text mistakes.
Revised the paragraph about moving a vector (taking into account suggestions by echochamber).
Fixed markdown.
Fixes requested by steveklabnik.
Brought back a sentence about supposed inefficiency.
2015-05-11 09:02:25 +02:00
Carol Nichols
218d38fb94
Overwrite grammar sections with what was removed from the reference
...
Between ffc5f1c
, when grammar.md was created by copying parts of the
reference, and 8cf2552
, when all EBNF was removed from reference.md,
there were parts of the grammar that were updated in reference.md but
not grammar.md, and then they weren't copied over because they existed
already, but they were slightly out of date.
Example: the `path_item : ident | "self" ;` rule in Use declarations was
changed from "mod" to "self" in the reference in 195fd9a
but wasn't
updated in the grammar.
2015-05-10 22:47:39 -04:00
Carol Nichols
53cd0bc772
Add literal semicolon to the grammar of view_item
...
Both external crate declarations and use declarations need to end with a
semicolon.
2015-05-10 22:47:39 -04:00
Carol Nichols
c3156a8ff4
Remove operator precedence section covered in the reference
2015-05-10 22:47:39 -04:00
Carol Nichols
e607d76564
Fill in more parts of the grammar for Expressions
2015-05-10 22:47:31 -04:00
Carol Nichols
ab913c881c
Fill in grammar for Statements
...
Some of this text is duplicated in the reference (and belongs there) so
remove it. It says item grammar is the same, so point to that grammar
section.
2015-05-10 22:37:31 -04:00
Carol Nichols
a5c651cfdf
Point to the use declaration section from the re-exporting section
...
The syntax for re-exporting privacy is covered in the use declaration
item.
2015-05-10 22:27:10 -04:00
Carol Nichols
c9c8ff1762
Add visibility section of the grammar
...
Namely an optional "pub" before any item. The "pub" in the Use
declaration section should use this too.
2015-05-10 22:26:45 -04:00
Ulrik Sverdrup
12d50b2da0
docs: Fixes in Reference Chapter 6.1
2015-05-11 03:41:54 +02:00
Johann
6a19046423
Four spaces indent, rephrasing
2015-05-11 02:40:02 +02:00
Johann Hofmann
770f0e95a1
Add if let expressions example
2015-05-11 02:03:37 +02:00
Johann Hofmann
295b62dfb9
Docs: Compile-time bounds check in index expression
...
The reference was claiming all vectors all bounds-checked at run-time, when constant vectors are usually checked at compile-time.
For the changed example see http://is.gd/28ak9E
2015-05-11 01:22:57 +02:00
Pete Hunt
a168a15008
Fix typo in references-and-borrowing docs
2015-05-10 16:10:02 -07:00
Pete Hunt
6d410132dc
Fix typo in guessing-game docs
2015-05-10 15:11:40 -07:00
Jan-Erik Rediger
f11c4ba30c
Remove extra parentheses
2015-05-10 23:22:00 +02:00
Steve Klabnik
c70458ba5d
Rollup merge of #25263 - fhinkel:master, r=steveklabnik
2015-05-10 16:44:24 -04:00
Steve Klabnik
7ae332c39f
Rollup merge of #25257 - dpetersen:mutability-docfix, r=steveklabnik
...
I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping.
Edit: I found another minor thing as I continued reading.
P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job!
r? @steveklabnik
2015-05-10 16:44:23 -04:00
Steve Klabnik
fa207fafc6
Rollup merge of #25239 - sindreij:patch-1, r=alexcrichton
2015-05-10 16:44:22 -04:00
Steve Klabnik
ba8eb58257
Rollup merge of #25222 - GuillaumeGomez:doc-ref, r=steveklabnik
...
r? @steveklabnik
2015-05-10 16:44:22 -04:00
Steve Klabnik
a7253780b2
Rollup merge of #25188 - tincann:patch-1, r=steveklabnik
2015-05-10 16:44:22 -04:00
Alexander Polakov
0c390d2f8e
point supposed to be immutable in this example
2015-05-10 22:37:06 +03:00
Guillaume Gomez
25543f38e4
Add missing backticks
2015-05-10 21:05:04 +02:00
Sindre Johansen
8ad1c90db0
Removed the backticks on slices
2015-05-10 11:16:32 +02:00
Franziska Hinkelmann
2cc4d822df
Fix small typos in documentation
2015-05-10 08:02:06 +02:00
Manish Goregaokar
459652c832
Rollup merge of #25251 - nham:whitespace_lang_items, r=Manishearth
...
In my opinion this looks nicer, but also it matches the whitespace generally
used for stability markers.
2015-05-10 11:01:46 +05:30
Manish Goregaokar
fd099b2d50
Rollup merge of #25249 - robyoung:minor-doc-fix, r=Manishearth
...
Remove an rogue 'is' and fix some line wrapping.
2015-05-10 11:01:46 +05:30
Manish Goregaokar
79ca74d8e3
Rollup merge of #25242 - acgtyrant:patch-3, r=Manishearth
...
Fix a typo while `io::stdin().read_line()` returns `Result` actually
2015-05-10 11:01:45 +05:30
Don Petersen
ae1b64ff73
Fix typo in Match document.
2015-05-09 22:10:34 -07:00
Don Petersen
f8888af412
Add omitted word to mutability docs.
2015-05-09 20:32:00 -07:00
Isaac Ge
fa3fd813d6
Update error-handling.md
...
Fix two typos while `io::stdin().read_line()` returns `Result` actually
Signed-off-by: acgtyrant <acgtyrant@gmail.com>
2015-05-10 10:20:47 +08:00
Nick Hamann
7984074e25
Convert #[lang=".."] to #[lang = ".."] for docs too.
2015-05-09 16:08:02 -05:00
Rob Young
978dc9f36a
Minor docs fix
...
Remove an rogue 'is' and fix some line wrapping.
2015-05-09 18:31:00 +01:00
Manish Goregaokar
ac478ecb50
Rollup merge of #25216 - barosl:no-more-task, r=Manishearth
...
I've found that there are still huge amounts of occurrences of `task`s in the documentation. This PR tries to eliminate all of them in favor of `thread`.
2015-05-09 18:40:19 +05:30
Sindre Johansen
7a91fe845c
Fixed a typo. Removed an extra s
2015-05-09 12:59:24 +02:00
bors
95400c51c3
Auto merge of #25214 - acgtyrant:patch-1, r=brson
...
make the definition of static methods explicit
2015-05-09 07:31:44 +00:00
Carol Nichols
bf06163ea7
Remove references to deprecated extern crate "foo" as bar
syntax
...
This syntax was removed in b24a3b8
but references remained in the
grammar, the reference, rustdoc generation, and some auxiliary test
files that don't seem to have been used since 812637e
.
2015-05-08 20:48:54 -04:00
Guillaume Gomez
715f7c3cd2
Add a precision for references
2015-05-08 23:54:24 +02:00
Brian Anderson
51a1e83cb0
doc: Remove mention of 30 minute intro
2015-05-08 13:19:02 -07:00
Manish Goregaokar
55437b4a57
Rollup merge of #25215 - acgtyrant:patch-2, r=alexcrichton
...
Fix wrong radius valve from 0.0 to 1.0 as above
2015-05-09 00:37:45 +05:30
Manish Goregaokar
4b4cb86248
Rollup merge of #25195 - simonkern:master, r=steveklabnik
...
I deleted one unneccessary 'the' and added the href for [bindings]
2015-05-09 00:37:43 +05:30
Manish Goregaokar
b02270963c
Rollup merge of #25181 - steveklabnik:fix_curlies, r=alexcrichton
2015-05-09 00:37:43 +05:30
Manish Goregaokar
61c1cf7f74
Rollup merge of #25179 - bengesoff:patch-1, r=steveklabnik
...
Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""
2015-05-09 00:37:42 +05:30
Barosl Lee
1e1e6e046a
Fix invalid references due to the automated string substitution
2015-05-09 02:24:18 +09:00
Barosl Lee
ff332b6467
Squeeze the last bits of task
s in documentation in favor of thread
...
An automated script was run against the `.rs` and `.md` files,
subsituting every occurrence of `task` with `thread`. In the `.rs`
files, only the texts in the comment blocks were affected.
2015-05-09 02:24:18 +09:00
Isaac Ge
962816bc29
Update method-syntax.md
...
Fix wrong radius valve from 0.0 to 1.0 as above
2015-05-08 22:39:25 +08:00
Isaac Ge
544362c9b8
Update method-syntax.md
...
make the definition of static methods explicit
2015-05-08 22:30:00 +08:00
Andrew Straw
391d14802e
fix logic when describing kinds of borrows
...
If you have 0 references (`&T`) to a resource, presumably, you could
have a mutable reference (`&mut T`). So this only start to make sense
at having 1 reference to a resource.
2015-05-08 06:12:59 +02:00
Simon Kern
60c0e75e74
fixed href for structs
2015-05-08 01:46:26 +02:00
Simon Kern
3e76f2838a
v2 gets a copy of the pointer, not a copy of the data
2015-05-08 01:43:18 +02:00
Simon Kern
84c7dfa48c
deleted unnecessary the
2015-05-08 00:59:45 +02:00
Simon Kern
2213898c19
two minor fixes
2015-05-08 00:42:10 +02:00
Tincan
ae1b2f4bf3
Another typo
2015-05-07 21:31:10 +02:00
Tincan
4d1e48e376
Typo in ownership.md
2015-05-07 20:23:47 +02:00
Ben Gesoff
888086d959
Undid changes involving misunderstanding of 0.3.x
...
Didn't realise 0.3.0 referred to all 0.3.x versions! Fixed my mistakes. Should have just updated the Cargo.toml now.
2015-05-07 15:36:47 +01:00
Steve Klabnik
07499918b3
Fix incorrect curly quotes
2015-05-07 10:26:00 -04:00
Ben Gesoff
0bc6fe5ea0
Refactor to keep rand version 0.3.0
...
changed paragraphs with discussion of Cargo.lock file to agree with rand version 0.3.0 in the Cargo.tom file.
2015-05-07 14:48:44 +01:00
Ben Gesoff
7150d3cd9e
Change rand version to '*'
...
Following paragraph says "we've used `*` which..." but code says "rand=\"0.3.0\""
2015-05-07 14:23:05 +01:00
Steve Klabnik
5ac5203e6e
Rollup merge of #25173 - andreastt:guessing_game_syntax_fix, r=steveklabnik
2015-05-07 12:21:05 +02:00
Steve Klabnik
464077d0a7
Rollup merge of #25156 - rydotyosh:patch-4, r=alexcrichton
...
Remove printing of secret number at final source.
2015-05-07 12:21:04 +02:00
Steve Klabnik
6db57a2dcb
Rollup merge of #25154 - rydotyosh:patch-3, r=steveklabnik
...
Edit version of #25150 .
This commit depends on #25148 .
2015-05-07 12:21:04 +02:00
Steve Klabnik
414e37f3d4
Rollup merge of #25148 - banks:master, r=steveklabnik
...
Let me know if I didn't follow correct procedure - seems a trivial change and no one that can be automatically tested.
2015-05-07 12:21:04 +02:00
Steve Klabnik
1d3183929a
Rollup merge of #25142 - rydotyosh:patch-1, r=alexcrichton
2015-05-07 12:21:03 +02:00
Steve Klabnik
0ad94ae126
Rollup merge of #25141 - steveklabnik:fix_guessing_game, r=huonw
...
https://github.com/rust-lang/rust/pull/25080/files#r29634986
r? @huonw
2015-05-07 12:21:03 +02:00
Steve Klabnik
888c12ccbb
Rollup merge of #25139 - hibariya:fix-indentation, r=alexcrichton
2015-05-07 12:21:03 +02:00
Steve Klabnik
76bbb3237c
Rollup merge of #25052 - jooert:misc_attr_reference, r=steveklabnik
...
Unsafe destructors were removed, added remarks about needed feature gates.
cc #16676
r? @steveklabnik
2015-05-07 12:21:02 +02:00
Andreas Tolfsen
9f84260138
doc: fix syntax error in Guessing Game
2015-05-07 11:59:33 +02:00
らいどっと
1884c87207
doc: Fix remove secret number at final source
...
Remove printing of secret number at final source.
2015-05-07 02:20:31 +09:00
らいどっと
08923fbff2
doc: Fix remove unused variable
...
This commit depends on #25148 .
2015-05-07 01:58:55 +09:00
Paul Banks
81b90bd56f
Correct initial guessing game example. Fixes #25147 . r? @steveklabnik
2015-05-06 14:00:35 +01:00
らいどっと
085e1f489b
doc: Fix link of repr attribute
2015-05-06 18:11:54 +09:00
Steve Klabnik
fc9bc779d2
Fix explanation of Cargo's behavior
...
https://github.com/rust-lang/rust/pull/25080/files#r29634986
2015-05-06 04:18:56 -04:00
Hika Hibariya
705f355e53
Fix indentation in the "Strings" chapter
2015-05-06 09:45:30 +09:00
Steve Klabnik
8aaafeaf79
Rollup merge of #25112 - jsyeo:jsyeo-while-let, r=alexcrichton
...
The indentation in this example is messed up. The `_ => break,` line was using a tab instead of spaces to indent.
2015-05-05 16:56:01 -04:00
Steve Klabnik
477cf9c606
Rollup merge of #25080 - steveklabnik:guessing_game, r=alexcrichton
...
This also made me realize that I wasn't using the correct term,
'associated functions', rather than 'static methods'. So I corrected
that in the method syntax chapter.
2015-05-05 16:56:01 -04:00
Steve Klabnik
1eae884f39
Rollup merge of #24782 - steveklabnik:doc_ownership, r=nikomatsakis
...
Also, as @huonw guessed, move semantics really _does_ make more sense as
a sub-chapter of ownership.
2015-05-05 16:56:01 -04:00
Steve Klabnik
9d512fdd19
TRPL: guessing game
...
This also made me realize that I wasn't using the correct term,
'associated functions', rather than 'static methods'. So I corrected
that in the method syntax chapter.
2015-05-05 16:54:34 -04:00
Steve Klabnik
ab3cb8c5ae
TRPL: ownership, borrowing, and lifetimes
...
Also, as @huonw guessed, move semantics really _does_ make more sense as
a sub-chapter of ownership.
2015-05-05 14:27:31 -04:00
Jason Yeo
0476586643
Fix indentation in while-let example
2015-05-05 12:02:18 +08:00
Manish Goregaokar
135502ef00
Rollup merge of #25109 - alexcrichton:fix-doc-crates-io-link, r=steveklabnik
...
Right now it's all hosted over GitHub pages so https doesn't work, so only link
to the http version.
2015-05-05 09:24:48 +05:30
Manish Goregaokar
dc15a151ef
Rollup merge of #25107 - Stebalien:fix-faq, r=steveklabnik
...
`str`s is messy but string is incorrect.
2015-05-05 09:24:42 +05:30
Manish Goregaokar
aff0782b23
Rollup merge of #25104 - brson:rustup, r=alexcrichton
2015-05-05 09:24:29 +05:30
Manish Goregaokar
b8fedad89b
Rollup merge of #25068 - bguiz:patch-3, r=steveklabnik
...
- `File::open` is for opening a file in read-only mode
- `File::create` is for opening a file in write-only mode, which is what we want instead for this example to make sense
2015-05-05 09:23:36 +05:30
Alex Crichton
2c04696978
doc: Cargo documentation doesn't have https
...
Right now it's all hosted over GitHub pages so https doesn't work, so only link
to the http version.
2015-05-04 16:25:02 -07:00
Steven Allen
b630cd74dc
Strings and vectors are not built-in types.
...
strs messy but string is something else...
2015-05-04 17:38:10 -04:00
Brian Anderson
2de6515de8
doc: rustup.sh doesn't require sudo
2015-05-04 13:23:27 -07:00
bors
a979efc2f9
Auto merge of #25082 - shepmaster:inline-docs, r=steveklabnik
2015-05-04 13:16:20 +00:00
bors
165a8dec9c
Auto merge of #25055 - bguiz:patch-2, r=steveklabnik
...
- I found n error in the book, before contributing the patch to fix it, I had to find where they were hosted
- It took me quite look to find where within the rust-lang *organisation* it was! ... and this should make it easier for the next person in the same position
2015-05-04 09:11:27 +00:00
bors
77ce30f038
Auto merge of #24990 - steveklabnik:doc_associated_constants, r=alexcrichton
2015-05-03 22:42:33 +00:00
Jake Goulding
7826711dcb
Clean up the grammar around the inline attribute
2015-05-03 17:52:11 -04:00
Brendan Graetz
75a3e29042
=BG= minor: File::open --> File::create in rust book
...
- `FIle::open` is for opening a file in read-only mode
- `FIle::create` is for opening a file in write-only mode, which is what we want instead for this example to make sense
2015-05-03 20:42:47 +10:00
bors
0d7d3ec9d2
Auto merge of #25058 - steveklabnik:gh25008, r=huonw
...
Fixes #25008
2015-05-02 20:47:32 +00:00
Steve Klabnik
6b465f5c87
TRPL: associated constants
2015-05-02 11:58:30 -04:00
Steve Klabnik
df18642b1a
Revise @ in patterns section
...
Fixes #25008
2015-05-02 11:56:58 -04:00
Brendan Graetz
3eee2b9319
=BG= minor: add link to book source files
...
- I found n error in the book, before contributing the patch to fix it, I had to find where they were hosted
- It took me quite look to find where within the rust-lang *organisation* it was!
2015-05-02 22:40:07 +10:00
Brendan Graetz
07ff8279be
=BG= minor: ensure correct range bounds in concurreny examples in the rust book
...
- `0..2` iterates over `0,1`
- `0..3` iterates over `0,1,2`, which is what we want instead
2015-05-02 22:29:53 +10:00
Johannes Oertel
685a6f7086
Update "Miscellaneous attributes" section of reference manual
2015-05-02 12:44:57 +02:00
Jordan Humphreys
f2a19b39fb
Correct typo in introduction
...
Correct 'danging' to 'dangling'.
2015-05-01 16:54:57 -07:00
Manish Goregaokar
4aab003b60
Rollup merge of #24998 - steveklabnik:fix_links, r=alexcrichton
...
r? @alexcrichton
2015-05-01 20:20:20 +05:30
Manish Goregaokar
0855b7c8b5
Rollup merge of #24994 - steveklabnik:gh24977, r=alexcrichton
...
Fixes #24977
2015-05-01 20:20:20 +05:30
Manish Goregaokar
d3b7c5258f
Rollup merge of #24992 - steveklabnik:gh24730, r=alexcrichton
...
Fixes #24730
r? @alexcrichton
2015-05-01 20:20:20 +05:30
Manish Goregaokar
4fda7e8b38
Rollup merge of #24991 - steveklabnik:gh24852, r=alexcrichton
...
First, a link was broken.
Second, the wording was a bit unclear, so I fixed it up.
Fixes #24852
2015-05-01 20:20:19 +05:30
Manish Goregaokar
42fbcf3525
Rollup merge of #24982 - poga:fix-incorrect-doc-formatting, r=steveklabnik
...
Fix incorrect link tag formatting in `doc/trpl/nightly-rust.md`. Notice the last word of the paragraph.
Before:
![before](https://cloud.githubusercontent.com/assets/8631/7413645/10754b7e-ef80-11e4-9bb1-15e87ce9308f.png )
After:
![after](https://cloud.githubusercontent.com/assets/8631/7413647/13b96202-ef80-11e4-990b-6ecf72925e7d.png )
2015-05-01 20:20:19 +05:30
Manish Goregaokar
70020aa066
Rollup merge of #24981 - carols10cents:remove-more-priv, r=alexcrichton
...
Hi! While researching stuff for the reference and the grammar, I came across a few mentions of using the `priv` keyword that was removed in 0.11.0 (#13547 , #8122 , rust-lang/rfcs#26 , [RFC 0026](https://github.com/rust-lang/rfcs/blob/master/text/0026-remove-priv.md )).
One occurrence is a mention in the reference, a few are in comments, and a few are marking test functions. I left the test that makes sure you can't name an ident `priv` since it's still a reserved keyword. I did a little grepping around for `priv `, priv in backticks, `Private` etc and I think the remaining instances are fine, but if anyone knows anywhere in particular I should check for any other lingering mentions of `priv`, please let me know and I would be happy to! 🍂 🌊
2015-05-01 20:20:18 +05:30
Steve Klabnik
585c7e2a0a
Fix broken links in the book.
2015-04-30 16:00:44 -04:00
Steve Klabnik
8c38dfd537
Describe (a,) vs (a) in docs
...
Fixes #24730
2015-04-30 15:10:58 -04:00
Steve Klabnik
0b06fd70c8
Fix code sample, remove unstable code
...
Fixes #24977
2015-04-30 14:17:56 -04:00
Steve Klabnik
91e5481218
Fix two issues with TRPL: unsized types
...
First, a link was broken.
Second, the wording was a bit unclear, so I fixed it up.
Fixes #24852
2015-04-30 13:41:26 -04:00
bors
2568a4d8c5
Auto merge of #24924 - carols10cents:grammar-improvements, r=pnkfelix
...
I'm interested in helping out with #16676 but more in the grammar than the reference-- here's my first chunk, more to come!! 🎉
I did pull a bit *out* of the reference, though, that was more relevant to the grammar but wasn't moved over as part of #24729 .
I'm looking at, e.g. https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs , as the source of truth, please let me know if I should be checking against something else instead/in addition.
r? @steveklabnik
2015-04-30 17:07:14 +00:00
Poga Po
8a20b994ea
remove newline within link tag
2015-04-30 21:28:49 +08:00
bors
42bfeec53c
Auto merge of #24842 - GBGamer:patch-3, r=steveklabnik
...
They now use the currently working syntax.
Also, I added two examples.
2015-04-30 10:13:05 +00:00
bors
b594036069
Auto merge of #24970 - Hech:master, r=steveklabnik
2015-04-30 07:12:25 +00:00
Carol Nichols
899d4180ef
Remove lingering mention of 'priv' in the reference
2015-04-29 22:43:26 -04:00
Hech
f8b63e867d
docs: link fix
2015-04-29 17:30:46 -07:00
Alex Crichton
0cca57712d
rollup merge of #24933 : oli-obk/patch-1
...
compiler plugins are hosted unter "compiler-plugins.html" not "plugins.html"
2015-04-29 15:45:52 -07:00
Alex Crichton
dd12c8b46f
rollup merge of #24931 : jooert/patch-1
...
Since #24783 , the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923 .
2015-04-29 15:45:51 -07:00
Alex Crichton
8daf961a63
rollup merge of #24881 : chris-morgan/issue-24872
...
Fixes #24872 .
2015-04-29 15:45:41 -07:00
Alex Crichton
a24e036126
rollup merge of #24871 : mbrubeck/doc-edit
...
r? @steveklabnik
2015-04-29 15:45:40 -07:00
Alex Crichton
18a0269d9d
rollup merge of #24870 : tshepang/reference-fix-brackets
...
Also, remove the other brackets, because they make the whole sentence look awkward.
2015-04-29 15:45:39 -07:00
Alex Crichton
256023a284
rollup merge of #24862 : barometz/intro-push-err-fix
...
The error in the Brief Introduction shows the problematic line as "x.push(4)", while the example code uses a vector of strings.
2015-04-29 15:45:38 -07:00
Oliver Schneider
d6043d1e71
fix broken link
...
compiler plugins are hosted unter "compiler-plugins.html" not "plugins.html"
2015-04-29 11:41:00 +02:00
jooert
f99658d7c7
Adapt benchmark tests to unit test guidelines
...
Since #24783 , the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923 .
2015-04-29 10:36:43 +02:00
Carol Nichols
0ddee94cfe
Move explanation that references lexical grammar to the grammar
...
Reword so that the references to things above/below are up to date and a
bit more specific.
2015-04-28 22:02:53 -04:00
Carol (Nichols || Goulding)
3e521bfd96
Add boolean literal to the grammar
...
To make this rule match the definition of Lit_ in
https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs
2015-04-28 21:46:49 -04:00
Jim Blandy
742ad41359
Fix link to C++ FQA
...
Fix the link to the "static initialization order fiasco" discussion in the C++ Frequently Questioned Answers.
2015-04-28 13:45:40 -07:00
Toni Cárdenas
df1768d8eb
TRPL: Tiny incoherence in UFCS example.
...
`Type` should be `Trait` to match the next example line.
r? @steveklabnik
2015-04-28 11:10:01 +02:00
Chris Morgan
928bd4fe10
Fix #24872 , XSS in docs not found page.
2015-04-28 13:31:45 +10:00
Carol (Nichols || Goulding)
d715409736
Make item sections match item EBNF
...
`enum_item` appeared in the `item` list but did not have an associated section;
`const_item` had a section but did not appear in the list.
2015-04-27 22:02:16 -04:00
bors
857ef6e272
Auto merge of #23606 - quantheory:associated_const, r=nikomatsakis
...
Closes #17841 .
The majority of the work should be done, e.g. trait and inherent impls, different forms of UFCS syntax, defaults, and cross-crate usage. It's probably enough to replace the constants in `f32`, `i8`, and so on, or close to good enough.
There is still some significant functionality missing from this commit:
- ~~Associated consts can't be used in match patterns at all. This is simply because I haven't updated the relevant bits in the parser or `resolve`, but it's *probably* not hard to get working.~~
- Since you can't select an impl for trait-associated consts until partway through type-checking, there are some problems with code that assumes that you can check constants earlier. Associated consts that are not in inherent impls cause ICEs if you try to use them in array sizes or match ranges. For similar reasons, `check_static_recursion` doesn't check them properly, so the stack goes ka-blooey if you use an associated constant that's recursively defined. That's a bit trickier to solve; I'm not entirely sure what the best approach is yet.
- Dealing with consts associated with type parameters will raise some new issues (e.g. if you have a `T: Int` type parameter and want to use `<T>::ZERO`). See rust-lang/rfcs#865 .
- ~~Unused associated consts don't seem to trigger the `dead_code` lint when they should. Probably easy to fix.~~
Also, this is the first time I've been spelunking in rustc to such a large extent, so I've probably done some silly things in a couple of places.
2015-04-27 16:45:21 +00:00
Matt Brubeck
d8797b090f
[reference] Fix a typo in 3.4 Whitespace
2015-04-27 09:31:49 -07:00
Tshepang Lekhonkhobe
f6c673e9f0
reference: add missing bracket
...
Also, remove the other brackets, because they make the whole sentence
look awkward.
2015-04-27 16:53:25 +02:00
Steve Klabnik
1b18da4a46
Rollup merge of #24867 - tshepang:patch-3, r=steveklabnik
2015-04-27 10:26:20 -04:00
Steve Klabnik
0c3514253c
Rollup merge of #24866 - tshepang:vec-intro, r=steveklabnik
2015-04-27 10:26:20 -04:00
Steve Klabnik
188f3eb8f5
Rollup merge of #24863 - dhardy:patch-1, r=steveklabnik
...
Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.
2015-04-27 10:26:19 -04:00
Tshepang Lekhonkhobe
14a6a9f5e2
reference: block-comment -> block comment
2015-04-27 15:42:46 +02:00
Manish Goregaokar
38042d1e18
trpl: clarify lib.rs vs main.rs
2015-04-27 18:42:19 +05:30
Tshepang Lekhonkhobe
7335c9f48f
book: improve Vec intro
2015-04-27 14:11:27 +02:00
Diggory Hardy
cf650a2174
Update reference.md: floating-point section
...
Clarify type inference of floating-point literals
2015-04-27 12:24:47 +01:00
Diggory Hardy
709f3c5130
Update reference.md: string literals section
...
Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.
2015-04-27 11:39:42 +01:00
Dominic van Berkel
9ddfbb1ae2
Adjusted intro error to match code
...
The error in the Brief Introduction shows the problematic line as "x.push(4)", while the example code uses a vector of strings.
2015-04-27 12:21:26 +02:00
Nicholas
766c1bc992
Fix the errors
2015-04-26 19:44:44 -07:00
diwic
d2d8898423
book: Fix broken link to unsafe chapter
2015-04-26 20:32:14 +02:00
Nicholas
a70b2ed826
Outputs no longer have to be mutable
2015-04-26 10:34:28 -07:00
Nicholas
3d0ad46eea
Fix the inline assembly examples
...
They now use the currently working syntax.
2015-04-26 10:26:56 -07:00
bors
61a5e46726
Auto merge of #24825 - rkruppe:reference-audit, r=steveklabnik
...
Transplant the relevant changes (turns out to be all of them) to `grammar.md`, and remove all grammar talk from `reference.md`. Sorry for the chaos.
The second commit, further below, goes over the comments and whitespace sections.
r? @steveklabnik
2015-04-26 03:34:38 +00:00
bors
20adc9533d
Auto merge of #24815 - heejongahn:master, r=steveklabnik
...
At https://doc.rust-lang.org/book/vectors.html , there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.
r? @steveklabnik
2015-04-26 01:37:58 +00:00
Robin Kruppe
0ea193def9
Reference audit: comments and whitespace sections
2015-04-26 02:02:13 +02:00
Robin Kruppe
85ee89ae70
Redo PR #24811 properly
...
Transplant the grammar-related changes to grammar.md,
and remove all grammar talk from reference.md
2015-04-25 22:56:00 +02:00
Heejong Ahn
9a2a06cf43
Added a link address to Vectors page of the book
...
At https://doc.rust-lang.org/book/vectors.html , there should be a link to
Generics page but the link address is ommitted and thus link is not functioning
well. So I added a link definition to the vectors.md.
r? @steveklabnik
2015-04-26 02:04:38 +09:00
Manish Goregaokar
9316b0382b
Rollup merge of #24812 - jest:master, r=steveklabnik
...
Conflicts:
src/doc/trpl/variable-bindings.md
2015-04-25 21:22:03 +05:30
Manish Goregaokar
007c81b83d
Rollup merge of #24811 - rkruppe:reference-audit, r=steveklabnik
...
Mention `non_ascii_idents` feature gate and remove unused productions.
r? @steveklabnik
2015-04-25 21:18:47 +05:30
Manish Goregaokar
23782ad9a8
Rollup merge of #24809 - conradkleinespel:master, r=Manishearth
...
The reference has broken links. This should fix it.
2015-04-25 21:18:47 +05:30
Manish Goregaokar
cfe08b74bf
Rollup merge of #24806 - FuGangqiang:doc, r=Manishearth
2015-04-25 21:18:47 +05:30
Przemysław Wesołek
2c2abe9a75
A number of spell-checking corrections.
2015-04-25 16:48:44 +02:00
bors
83263b48c3
Auto merge of #24803 - SkylerLipthay:patch-2, r=huonw
...
The description of the syntax for single byte literals is missing the preceding `b` distinction.
2015-04-25 13:10:33 +00:00
Robin Kruppe
702f17566c
Audit reference manual: 3.2 Special unicode productions
...
Mention non_ascii_idents feature gate and remove unused productions
2015-04-25 14:38:23 +02:00
Conrad Kleinespel
b66f858e8f
fix compiler plugins path in doc/reference.md
2015-04-25 13:43:26 +02:00
bors
e3d00a4980
Auto merge of #24783 - jooert:unittestguidelines, r=alexcrichton
...
Changes the style guidelines regarding unit tests to recommend using a sub-module named "tests" instead of "test" for unit tests as "test" might clash with imports of libtest (see #23870 , #24030 and http://users.rust-lang.org/t/guidelines-naming-of-unit-test-module/1078 for previous discussions).
r? @alexcrichton
2015-04-25 09:55:06 +00:00
FuGangqiang
46462c7b5f
fix doc
2015-04-25 16:30:25 +08:00
Skyler
b6dd0197f3
Reference manual 3.5.2.3.1
...
The description of the syntax for single byte literals is missing the preceding `b` distinction.
2015-04-24 23:26:56 -07:00
Michael Rosenberg
23b1d172a8
More small syntax changes in reference.md
2015-04-24 22:56:32 -04:00
Steve Klabnik
c7279b4214
Rollup merge of #24775 - mbrubeck:reference, r=steveklabnik
...
Update 7.2.20 (`for` expressions):
* `for` loops now use `IntoIterator` instead of just `Iterator`
* Simplify the example by removing unnecessary `Vec::iter` call.
...and a fix for a minor formatting error.
r? @steveklabnik
2015-04-24 22:54:27 -04:00
Steve Klabnik
120065e7f2
Rollup merge of #24766 - nwin:patch-1, r=steveklabnik
...
Changed in #22838 .
audited (raw) byte string literals @ #16676
2015-04-24 22:54:26 -04:00
Steve Klabnik
c632bdc67a
Rollup merge of #24736 - steveklabnik:doc_mutability, r=alexcrichton
...
Okay, last chapter other than ownership stuff. 🎊
2015-04-24 22:54:25 -04:00
Steve Klabnik
3c6c16e00f
Rollup merge of #24729 - mdinger:reference_grammar, r=steveklabnik
...
From https://github.com/rust-lang/rust/issues/24723#issuecomment-95636827 :
> Yes, I've been meaning to just remove it in favor of GRAMMAR.md
> - steveklabnik
2015-04-24 22:54:25 -04:00
Steve Klabnik
02194bc772
Rollup merge of #24725 - steveklabnik:doc_operators_and_overloading, r=alexcrichton
...
I forgot these heavily use associated types, so move it after that
as well.
2015-04-24 22:54:25 -04:00
Steve Klabnik
831232b767
Rollup merge of #24722 - steveklabnik:doc_deref, r=alexcrichton
...
r? @alexcrichton
2015-04-24 22:54:24 -04:00
Steve Klabnik
d70a994536
TRPL: deref coercions
2015-04-24 18:39:31 -04:00
Steve Klabnik
e715205606
TRPL: mutability
2015-04-24 17:57:16 -04:00
Steve Klabnik
b24271ee9d
TRPL: operators and overloading
...
I forgot these heavily use associated types, so move it after that
as well.
2015-04-24 17:27:49 -04:00
Johannes Oertel
07cc7d9960
Change name of unit test sub-module to "tests".
...
Changes the style guidelines regarding unit tests to recommend using a
sub-module named "tests" instead of "test" for unit tests as "test"
might clash with imports of libtest.
2015-04-24 23:06:41 +02:00
mdinger
7089c5e79c
Remove keywords from reference because they're already in grammar
2015-04-24 16:50:23 -04:00
mdinger
9ecfdada2b
Updates to grammar
2015-04-24 16:50:23 -04:00
mdinger
8cf255268c
Remove ebnf from reference
2015-04-24 16:50:22 -04:00
Matt Brubeck
331821e3a0
[reference] Update 7.2.20: For expressions.
...
* `for` loops now use `IntoIterator` instead of just `Iterator`
* Simplify the example by removing unnecessary `Vec::iter` call.
2015-04-24 09:24:53 -07:00
Matt Brubeck
7972fbb735
[reference] Fix missing formatting.
2015-04-24 09:24:53 -07:00
bors
714bd493c7
Auto merge of #24744 - bluss:reference-1, r=steveklabnik
...
Audit & Edit Chapter 8.1 Types in reference manual
- Remove mention of unit type
- Update closure types and reference types sections
- Fix minor typos
2015-04-24 15:48:35 +00:00
Ulrik Sverdrup
b22ea2db9c
reference: Audit & Edit chapter 8.1 Types.
...
- Remove mention of unit type
- Update closure types and reference types sections
- Fix minor typos
2015-04-24 16:55:57 +02:00
Manish Goregaokar
1447ee4c20
Rollup merge of #24727 - rkruppe:reference-audit, r=steveklabnik
...
It was in pretty good shape, but since that is my pet peeve, I clarified the compiler/interpreter distinction and why it is irrelevant for this section. Otherwise only a couple of minor clarifications, and weasel words where reality is more complicated than the text accounted for (e.g., there is more than one kind of library).
r? @steveklabnik
2015-04-24 19:21:14 +05:30
Manish Goregaokar
0c1df5dadf
Rollup merge of #24721 - vosen:patch-1, r=steveklabnik
...
`us` and `is` were replaced with `usize` and `isize` some time ago. Other than that, 3.5.2.1.5 is correct.
2015-04-24 19:21:14 +05:30
Manish Goregaokar
7a50ecdd72
Rollup merge of #24698 - steveklabnik:remove_debug_display, r=steveklabnik
...
this is too small for its own thing, I think.
2015-04-24 19:21:13 +05:30
nwin
38c3b62e83
Byte string literals are now fixed-size arrays
...
Changed in #22838 .
audited (raw) byte string literals @ #16676
2015-04-24 11:12:53 +02:00
Manish Goregaokar
131b5aca5a
fixup #24754
2015-04-24 10:38:07 +05:30
Manish Goregaokar
a33b5d3460
Rollup merge of #24754 - iliekturtles:patch-1, r=steveklabnik
2015-04-24 09:50:16 +05:30
Manish Goregaokar
53d6b38c21
Rollup merge of #24753 - tynopex:patch-1, r=steveklabnik
...
Add section for range expressions.
2015-04-24 09:49:59 +05:30
Manish Goregaokar
f91216bdc2
Rollup merge of #24752 - doomrobo:patch-1, r=steveklabnik
...
Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.
2015-04-24 09:49:44 +05:30
Manish Goregaokar
76dd69183f
Rollup merge of #24750 - withoutboats:patch-1, r=steveklabnik
...
1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
2015-04-24 09:49:27 +05:30
Manish Goregaokar
7e3bb03429
Rollup merge of #24743 - geofft:trpl-macros-links, r=steveklabnik
...
r? @steveklabnik
2015-04-24 09:49:12 +05:30
Manish Goregaokar
292a25f755
Rollup merge of #24742 - mbrubeck:keywords, r=steveklabnik
...
* Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords
r? @steveklabnik
2015-04-24 09:48:50 +05:30
Manish Goregaokar
9863f2c4f3
Rollup merge of #24740 - mbrubeck:reference, r=steveklabnik
...
r? @steveklabnik
2015-04-24 09:48:33 +05:30
Manish Goregaokar
cda00831e3
Rollup merge of #24734 - vadimcn:patch-1, r=alexcrichton
...
'win32' -> 'windows', added 'ios'
2015-04-24 09:47:58 +05:30
Sean Patrick Santos
b1db4ec3d0
Feature-gate associated constants.
2015-04-23 21:02:29 -06:00
Mike Boutin
4c2274e1ab
Fix spelling errors.
2015-04-23 20:49:27 -04:00
tynopex
4db0efb45c
Update reference.md
...
Add section for range expressions.
2015-04-23 20:38:11 -04:00
Michael Rosenberg
352838ed34
Update "Generic Functions" section
...
Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.
2015-04-23 20:33:46 -04:00
Lee Aronson
3ae6a5e48d
Fixed typo
2015-04-23 16:50:05 -07:00
Lee Aronson
da5f80cc6d
Improve information about loops
...
1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.
2015-04-23 16:46:33 -07:00
Matt Brubeck
4cab21c003
Also mention /*!
doc comments.
2015-04-23 14:26:07 -07:00
Geoffrey Thomas
2f491228c0
TRPL: Remove references to "advanced macros chapter"
...
This was merged back into the regular macros chapter, but a few
references lingered and caused broken links.
2015-04-23 17:17:14 -04:00
Matt Brubeck
17390a1a79
Update and organize the Keywords table
...
* Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords
2015-04-23 14:15:42 -07:00
Geoffrey Thomas
ad2684c41c
TRPL: Fix link to macro section of reference
2015-04-23 17:08:19 -04:00
Matt Brubeck
1b878379e9
Clarify that //! comments are also doc comments.
2015-04-23 14:03:25 -07:00
Vadim Chugunov
58b3b8bcfa
Update supported values of target_os
...
'win32' -> 'windows', added 'ios'
2015-04-23 12:32:25 -07:00
nwin
99fd7f2131
typo 2
2015-04-23 21:26:34 +02:00
nwin
a8f5989afb
typo
2015-04-23 21:25:09 +02:00
nwin
efb457b8cf
object type -> trait object
...
Consistency. The book also refers to it as trait objects.
2015-04-23 21:23:35 +02:00
Robin Kruppe
e9f298082e
Reference audit: section 5 (Crates and source files)
2015-04-23 19:06:09 +02:00
Andrzej Janik
5efdbecdf9
Stop mentioning obsolete integer suffixes
...
`us` and `is` were replaced with `usize` and `isize` some time ago.
2015-04-23 16:39:18 +02:00
bors
1114fcd945
Auto merge of #24664 - steveklabnik:doc_ufcs, r=alexcrichton
...
AKA, two four-letter acronyms 😉
This feels a bit light, if there's other things I should add, let me know.
2015-04-23 12:04:01 +00:00
Manish Goregaokar
b0319e9094
fix doctest
2015-04-23 04:56:00 +05:30
Steve Klabnik
b97b0e3929
TRPL: UFCS
...
AKA, two four-letter acronyms 😉
2015-04-22 18:30:27 -04:00
Manish Goregaokar
bd8101d698
Rollup merge of #24675 - steveklabnik:two_more_chapters, r=alexcrichton
...
Two more chapters of TRPL. The `type` one is pretty straightforward, but I wasn't really sure what to put for unsized types. I just explained the very basics, and the special bounds syntax. Thoughts on what else should go here?
r? @alexcrichton
2015-04-23 03:21:02 +05:30
Manish Goregaokar
231cb9361c
Rollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton
...
r? @alexcrichton
2015-04-23 03:21:02 +05:30
Steve Klabnik
a9bc39c536
remove debug and display chapter
...
this is too small for its own thing, I think.
2015-04-22 16:41:22 -04:00
Steve Klabnik
defdc4418a
TRPL: type aliases and unsized types
2015-04-22 13:27:13 -04:00
Steve Klabnik
a5ae4cc19d
TRPL: attributes & conditional compilation
2015-04-22 11:27:31 -04:00
bors
50cd2e84d5
Auto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton
...
r? @alexcrichton
2015-04-22 06:37:57 +00:00
Steve Klabnik
a04f6c5293
TRPL: const and static
2015-04-21 19:47:07 -04:00
Alex Crichton
a1dd5ac787
rollup merge of #24636 : alexcrichton/remove-deprecated
...
Conflicts:
src/libcore/result.rs
2015-04-21 15:28:53 -07:00
Alex Crichton
a568a7f9f2
std: Bring back f32::from_str_radix as an unstable API
...
This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.
2015-04-21 15:23:54 -07:00
Alex Crichton
44338cb944
rollup merge of #24672 : steveklabnik/edit_tuple_structs
...
I thought I edited all the last little chapters, but I missed this one.
r? @alexcrichton
2015-04-21 15:23:18 -07:00
Alex Crichton
0feaf6154c
rollup merge of #24669 : steveklabnik/fix
...
This section was added but the list wasn't updated.
2015-04-21 15:23:17 -07:00
Alex Crichton
83008b2e9b
rollup merge of #24667 : steveklabnik/more_editing
...
r? @alexcrichton
2015-04-21 15:23:16 -07:00
Alex Crichton
1a6c18d660
rollup merge of #24665 : sw17ch/document-complete-slice-syntax
...
The documentation doesn't appear to describe the `&foo[..]` syntax.
I tried looking in `primitive-types.html#slices` and `std/primitive.slice.html`.
There's an example of partially slicing an array in trpl and a mention of `&foo[..]` in [the standard library documentation](https://doc.rust-lang.org/std/primitive.slice.html ), but neither place, from what I can see, actually describes the behavior of `&foo[..]`.
+r? @steveklabnik
2015-04-21 15:23:15 -07:00
Alex Crichton
ee9d4eefba
rollup merge of #24663 : steveklabnik/gh24639
...
Fixes #24639
2015-04-21 15:23:14 -07:00
Alex Crichton
251f8d3fbd
rollup merge of #24654 : mdinger/patch-2
...
This just fixes some comments made on https://github.com/rust-lang/rust/pull/24632 . The second I think is better unless @steveklabnik actually meant something else.
2015-04-21 15:23:12 -07:00
Steve Klabnik
f78ee1aff1
Document functional update syntax
...
Fixes #24639
2015-04-21 16:18:51 -04:00
Steve Klabnik
b0105b5a59
TRPL editing: tuple structs
2015-04-21 15:25:43 -04:00
Steve Klabnik
f0a3b6c509
Add research to README of TRPL
...
This section was added but the list wasn't updated.
2015-04-21 13:49:23 -04:00
Steve Klabnik
0070625495
small edits for recently written book chapters
2015-04-21 13:17:43 -04:00
John Van Enk
5f7556cd39
Add an example of completely slicing an object.
2015-04-21 09:21:52 -07:00
Steve Klabnik
9cc0af8d69
Refocus unsafe code chapter on unsafe itself.
2015-04-21 08:28:06 -04:00
mdinger
dc596695c9
Fix typos
2015-04-21 01:05:26 -04:00
Steve Klabnik
9ddcc38b6e
Refocus unsafe code chapter on unsafe itself.
2015-04-20 21:17:46 -04:00
Steve Klabnik
1d082de2d9
Rollup merge of #24643 - steveklabnik:doc_if_let, r=jakub-
...
and while let
2015-04-20 21:15:54 -04:00
Steve Klabnik
52ec8bdf73
Rollup merge of #24632 - steveklabnik:casting_guide, r=alexcrichton
...
Due to documenting `transmute`, addresses part of #12905
2015-04-20 21:15:54 -04:00
Steve Klabnik
9f87362308
Rollup merge of #24631 - steveklabnik:unsafe_guide, r=alexcrichton
...
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.
This addresses part of #12905 .
2015-04-20 21:15:54 -04:00
Steve Klabnik
05ee6f0709
Rollup merge of #24630 - steveklabnik:quickfix, r=alexcrichton
2015-04-20 21:15:53 -04:00
Steve Klabnik
81b603e7a5
Rollup merge of #24577 - steveklabnik:gh24573, r=alexcrichton
...
Fixes #24573
2015-04-20 21:15:52 -04:00
Steve Klabnik
ff12b7b308
Rollup merge of #24571 - steveklabnik:editing, r=alexcrichton
...
A bunch of chapters, fixes an issue or two as well.
r? @alexcrichton
2015-04-20 21:15:52 -04:00
Steve Klabnik
de13f95f21
Rollup merge of #24516 - steveklabnik:gh22621, r=alexcrichton
...
Fixes #22621
2015-04-20 21:15:52 -04:00
Steve Klabnik
570b250b8f
TRPL: if let
...
and while let
2015-04-20 19:48:24 -04:00
Steve Klabnik
1e29abec59
Add common macros to TRPL
...
Fixes #22621
2015-04-20 14:40:54 -04:00
Steve Klabnik
1150fb0f88
TRPL: unsafe -> raw pointers
...
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.
This addresses part of #12905 .
2015-04-20 13:38:05 -04:00
Steve Klabnik
0f20c9d8b7
Remove feature gated examples from the reference.
...
The slice patterns example was nice, so let's put it with the other
slice pattern feature gate documentation.
Fixes #24573
2015-04-20 13:33:57 -04:00
Steve Klabnik
9a65045611
TRPL: casting
...
Due to documenting `transmute`, addresses part of #12905
2015-04-20 11:55:29 -04:00
Steve Klabnik
fbd3261e37
Fix small typo in TRPL intro
2015-04-20 10:42:17 -04:00
Steve Klabnik
14af25797f
TRPL edits: generics
2015-04-20 09:44:21 -04:00
Steve Klabnik
1c48227b3c
Remove inverse example from generics part of TRPL
...
Fixes #24325 .
2015-04-20 09:44:21 -04:00
Steve Klabnik
e289b689d4
TRPL edits: traits
...
Let's talk about generics first, since we use traits to bound them
in funtions.
Partially addresses #24325
Fixes #24271
2015-04-20 09:44:10 -04:00
Steve Klabnik
1646ebd5ba
move Deref coercions to syntax and semantics
...
It's a language feature, so it belongs here.
2015-04-20 09:37:49 -04:00
Steve Klabnik
5b54a4f03b
TRPL copyedits: strings
2015-04-20 09:37:49 -04:00
Steve Klabnik
73d3d68550
TRPL editing: vectors
2015-04-20 09:37:49 -04:00
Steve Klabnik
a3a2049166
Move drop back in TRPL TOC
...
It's a trait implementation, so we need traits first.
2015-04-20 09:37:49 -04:00
Steve Klabnik
f81b1fcf8c
TRPL edits: method syntax
2015-04-20 09:37:49 -04:00
Steve Klabnik
7f43c5782c
TRPL editing: structs
2015-04-20 09:37:48 -04:00
Steve Klabnik
44db46a308
TRPL editing: move patterns back
...
We want to talk about how to pattern match on structs, so let's bump
it back one.
2015-04-20 09:37:48 -04:00
Steve Klabnik
9661efac8b
TRPL editing: patterns
...
Partially addresses #24388
2015-04-20 09:37:48 -04:00
Steve Klabnik
836c8a826b
TRPL editing: match
2015-04-20 09:37:46 -04:00
Steve Klabnik
213708867e
TRPL editing: enums
...
Now that we're not doing the guessing game, a lot of this is irrelevant.
2015-04-20 09:37:45 -04:00
bors
ddf25c890d
Auto merge of #24572 - steveklabnik:gh24569, r=brson
...
Fixes #24569 .
Should wait until https://github.com/rust-lang/rust-www/pull/114 is merged.
2015-04-19 15:24:19 +00:00
bors
be41e98067
Auto merge of #24567 - tamird:windows-caviats, r=steveklabnik
...
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
https://github.com/rust-lang/rust/pull/17471
2015-04-19 13:20:24 +00:00
bors
bd968a1d65
Auto merge of #24554 - tshepang:let-faq, r=steveklabnik
2015-04-19 03:42:59 +00:00
bors
00978a9879
Auto merge of #24383 - avdi:patch-1, r=steveklabnik
...
"Dynamically typed" didn't seem like a relevant distinction; there are statically-compiled dynamically-typed languages. Another term that might work here (despite being notoriously vague) is "scripting languages".
2015-04-18 23:35:50 +00:00
Steve Klabnik
290da6f016
Remove the 30 minute intro
...
Fixes #24569 .
2015-04-18 17:55:31 -04:00
Tamir Duberstein
a8aa4ee034
Update Windows caveats
...
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
https://github.com/rust-lang/rust/pull/17471
2015-04-18 13:00:40 -07:00
Manish Goregaokar
88601f8d7d
fix doctest (fixup #24466 )
2015-04-19 00:54:42 +05:30
Manish Goregaokar
695efb53d6
Rollup merge of #24548 - graydon:reference-tidying, r=steveklabnik
...
This just deletes some egregious lies and obsolete terminology -- all of which I originally wrote -- from the reference. I expect the reference itself will be deleted soon enough, but I found myself gritting teeth over these bits too much to let them into a 1.0 release.
2015-04-18 23:29:58 +05:30
Manish Goregaokar
514e06d65d
Rollup merge of #24466 - steveklabnik:more_more_more, r=alexcrichton
...
Link to the big chapter for now, and add move semantics.
2015-04-18 23:29:57 +05:30
Tshepang Lekhonkhobe
4665c3bbfa
doc: improve/fix 'let' FAQ
2015-04-18 17:36:41 +02:00
Graydon Hoare
a99a8b0a92
Remove obsolete discusison of runtime, promote Linkage
to chapter.
2015-04-17 20:02:55 -07:00
Graydon Hoare
744085ed1d
Improve memory-model section very slightly.
2015-04-17 20:01:03 -07:00
Graydon Hoare
f5b2963103
Improve special-traits section very slightly.
2015-04-17 20:00:47 -07:00
Graydon Hoare
7f2f09f1b4
Eliminate the obsolete term 'slot'.
2015-04-17 19:52:29 -07:00
Graydon Hoare
21e2e6eec8
Clean up section on Type aliases.
2015-04-17 19:29:20 -07:00
Graydon Hoare
806d024783
Trim florid language.
2015-04-17 19:24:28 -07:00
Graydon Hoare
ca14b8121c
Trim malformed sentence.
2015-04-17 19:22:19 -07:00
Manish Goregaokar
1b6bd92790
Rollup merge of #24515 - steveklabnik:gh24070, r=Gankro
...
Fixes #24070
or rather, fixes it even though it's already been fixed: slices are before now. But the linking is nice anyway.
2015-04-17 19:01:32 +05:30
Manish Goregaokar
27dc069234
Rollup merge of #24513 - j1n3l0:patch-1, r=alexcrichton
2015-04-17 19:01:32 +05:30
Florian Hartwig
a4be1ec140
Fix broken links in the docs
2015-04-16 23:50:16 -04:00
Steve Klabnik
525a1462b5
Descripe tuple indexing in TRPL
...
FIxes #23962
2015-04-16 23:50:16 -04:00
Steve Klabnik
dc4554a9b3
Make note of documentation tests and binaries
...
Fixes #24228
2015-04-16 23:50:16 -04:00
Steve Klabnik
a2ccc81f4b
remove example usage of from_str in error docs
...
Fixes #24185
2015-04-16 23:50:16 -04:00
Steve Klabnik
3ca83a79bf
Make note of possible XSS in Rustdoc
...
Fixes #24160
2015-04-16 23:50:12 -04:00
Steve Klabnik
d9515ad40f
Link up some stuff in the vectors chapter
...
Fixes #24070
or rather, fixes it even though it's already been fixed: slices are before now. But the linking is nice anyway.
2015-04-16 23:17:36 -04:00
Steve Klabnik
00a8d65ef3
document missing attributes in the reference
...
Fixes #24406
2015-04-16 22:23:37 -04:00
Florian Hartwig
16b60cf003
Fix some broken links in the book
2015-04-16 22:23:37 -04:00
Ting-Yu Lin
e12671b4d7
Fix link id for stackoverflow
...
The document does not display properly if the link id contains a space.
2015-04-16 22:23:36 -04:00
Luke Gallagher
6d36714633
Fix some documentation typos
2015-04-16 22:23:36 -04:00
Nelo Onyiah
d04b2047a7
Update hello-cargo.md
2015-04-17 00:02:17 +01:00
bors
288809c8f3
Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton
...
r? @alexcrichton
2015-04-16 03:22:21 +00:00
Steve Klabnik
438011dc48
Rollup merge of #24476 - brettcannon:patch-3, r=steveklabnik
...
"as an library" -> "as a library"
2015-04-15 17:26:09 -04:00
Steve Klabnik
ff7c991305
Rollup merge of #24471 - andrewseidl:master, r=alexcrichton
...
Use external instead of relative link for rustbyexample.com in generated `src/doc/index.md`. (http://doc.rust-lang.org/nightly/index.html )
Previous: http://doc.rust-lang.org/nightly/rustbyexample.com
Desired: http://rustbyexample.com/
2015-04-15 17:26:09 -04:00
Steve Klabnik
68648fe0da
Rollup merge of #24468 - brettcannon:patch-2, r=alexcrichton
...
Link spanned a line and was missing the actual link target.
2015-04-15 17:26:08 -04:00
Steve Klabnik
f4647ac3b7
Rollup merge of #24467 - brettcannon:patch-1, r=alexcrichton
...
Had a newline in middle of a link, causing the link text to be shown with `[]`.
2015-04-15 17:26:08 -04:00
Steve Klabnik
031619f5af
Rollup merge of #24425 - dhuseby:bitrig_fixing_tests_3, r=alexcrichton
...
the code block in the no-stdlib.md file caused test failure on bitrig and openbsd.
Closes #24108
2015-04-15 17:26:06 -04:00
Brett Cannon
9ce73d40d4
Grammar fix
...
"as an library" -> "as a library"
2015-04-15 15:56:01 -04:00
Andrew Seidl
86ec4571d5
doc: Fix link to rustbyexample.com
2015-04-15 13:05:52 -05:00
Brett Cannon
40c7350407
Fix link to stack/heap page
...
Link spanned a line and was mising the actual link target.
2015-04-15 12:57:22 -04:00
Brett Cannon
09236bcb07
Fix link formatting error
...
Had a newline in middle of a link, causing the link text to be shown with `[]`.
2015-04-15 12:51:34 -04:00
Steve Klabnik
e5631f94b4
TRPL: move semantics
2015-04-15 11:50:35 -04:00
Tamir Duberstein
29ac04402d
Positive case of len()
-> is_empty()
...
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Steve Klabnik
54abe4ce91
link to ownership for now
2015-04-14 15:01:05 -04:00
Dave Huseby
6fc138136d
disabling a test for bitrig and openbsd
2015-04-14 11:21:33 -07:00
Alex Crichton
b9d9a376ea
rollup merge of #24385 : aturon/unstable-scoped
...
Conflicts:
src/libstd/thread/mod.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-reverse-complement.rs
src/test/run-pass/capturing-logging.rs
src/test/run-pass/issue-9396.rs
src/test/run-pass/tcp-accept-stress.rs
src/test/run-pass/tcp-connect-timeouts.rs
src/test/run-pass/tempfile.rs
2015-04-14 10:59:55 -07:00
Alex Crichton
7913f5659d
rollup merge of #24401 : fenduru/patch-2
...
Not sure if `From<Error>` is the correct way to reference that trait (maybe `From<E: Error>`?)
r? @steveklabnik
2015-04-14 10:56:00 -07:00
Alex Crichton
84e4a724dc
rollup merge of #24398 : steveklabnik/thanks_mdinger
...
The two-step command left off the nightly flag :frown:
Thanks @mdinger
2015-04-14 10:55:58 -07:00
Alex Crichton
cf53ae03da
rollup merge of #24394 : rundrop1/patch-1
...
Feel silly because it's just one thing but it was bothering me that the documentation tells you what you're not going to learn now instead of linking to the item in question. Am total noob pls assist, where is power button. :)
2015-04-14 10:55:57 -07:00
Alex Crichton
ecbbbfa258
rollup merge of #24393 : steveklabnik/rbe
...
It's no longer a community based project.
Also, Rust for Rubyists is deprecated at this point, so we shouldn't
link to it anymore.
2015-04-14 10:55:56 -07:00
Alex Crichton
db79ce0c9f
rollup merge of #24368 : kgv/fix
...
Remove arity link from enums.md
r? @steveklabnik
2015-04-14 10:55:46 -07:00
Alex Crichton
330466ed96
rollup merge of #24273 : steveklabnik/even_moar_editing
...
Three more sections
2015-04-14 10:55:41 -07:00
Steve Klabnik
6476a1e378
mutability fixes
2015-04-14 13:41:31 -04:00
Steve Klabnik
8b6987aced
copyediting: structs
2015-04-14 11:25:38 -04:00
Aaron Turon
a9fd41e1f9
Fallout: move from scoped to spawn
2015-04-14 08:15:45 -07:00
fenduru
ab93a51068
Point to From trait in error handling guide
...
Not sure if `From<Error>` is the correct way to reference that trait (maybe `From<E: Error>`?)
2015-04-13 22:01:20 -04:00
Steve Klabnik
00867b312c
Fix up nightly installation instructions.
...
The two-step command left off the nightly flag :frown:
Thanks @mdinger
2015-04-13 21:23:44 -04:00
Steve Klabnik
8a65029fac
Link RBE more prominently
...
It's no longer a community based project.
Also, Rust for Rubyists is deprecated at this point, so we shouldn't
link to it anymore.
2015-04-13 18:33:37 -04:00
rundrop1
57e3475794
Update vectors.md
...
Feel silly because it's just one thing but it was bothering me that the documentation tells you what you're not going to learn now instead of linking to the item in question. Am total noob pls assist, where is power button. :)
2015-04-13 17:14:53 -05:00
Avdi Grimm
810757935e
Wording for dynamic languages.
2015-04-13 16:23:57 -04:00
Avdi Grimm
ab8c884b34
Refer to Ruby/Python/JS as "dynamically evaluated"
...
"Dynamically typed" didn't seem like a relevant distinction; there are statically-compiled dynamically-typed languages. Another term that might work here (despite being notoriously vague) is "scripting languages".
2015-04-13 14:03:24 -04:00