Nick Howell
0c26524134
doc: Remove extra whitespace in the middle of lines to provide alignment
...
"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."
http://aturon.github.io/style/whitespace.html
I realize the linked page still needs an RFC, but the docs should be written in accordance with the guidelines nevertheless.
2015-01-17 10:51:53 -05:00
Steve Klabnik
433ea0bd55
Add C -> Rust example to FFI chapter of the book.
...
Fixes #10489 .
2015-01-17 10:51:07 -05:00
Steve Klabnik
d5091c9cc9
Fix up titles of TRPL chapters
2015-01-17 10:51:07 -05:00
Ms2ger
0109ceaf82
Fix typo.
2015-01-17 10:51:07 -05:00
Steve Klabnik
899ffcf62a
Intpocalypse, book edition.
...
Fix all usage of int/uint/i/u in the book.
2015-01-17 10:51:07 -05:00
Steve Klabnik
078bd498b9
Evaluate # fn in docs
...
I searched for times when we were hiding functions with # in the documentation,
and fixed them to not use it unless neccesary.
I also made random improvements whenever I changed something. For example,
I changed Example to Examples, for consistency.
Fixes #13423
2015-01-17 10:49:49 -05:00
Steve Klabnik
a03701defa
Remove segmented stack info from the FFI chapter of the book.
...
Fixes #20071 .
2015-01-17 10:49:49 -05:00
we
812ce6c190
Remove unnecessary explicit conversions to *const T
2015-01-17 07:34:10 +03:00
Alex Crichton
38cb91e66c
syntax: Feature gate #[start] and #[main]
...
These two attributes are used to change the entry point into a Rust program, but
for now they're being put behind feature gates until we have a chance to think
about them a little more. The #[start] attribute specifically may have its
signature changed.
This is a breaking change to due the usage of these attributes generating errors
by default now. If your crate is using these attributes, add this to your crate
root:
#![feature(start)] // if you're using the #[start] attribute
#![feature(main)] // if you're using the #[main] attribute
cc #20064
2015-01-16 14:59:03 -08:00
bors
f3d71be65c
Merge pull request #21214 from sleepynate/spacing-in-book
...
Fix commented graphs in src/doc/trpl/ownership.md
Reviewed-by: huonw
2015-01-16 06:31:03 +00:00
nathan dotz
3626a308f3
Fix commented graphs in src/doc/trpl/ownership.md
2015-01-15 18:15:18 -05:00
Alex Crichton
5f32992b31
rollup merge of #21206 : steveklabnik/expressions
...
Suggested here: http://stackoverflow.com/a/27962076/24817
2015-01-15 14:12:08 -08:00
Alex Crichton
8c81800170
rollup merge of #21148 : bombless/patch-1
2015-01-15 14:11:55 -08:00
Alex Crichton
b86a84867a
rollup merge of #21141 : tcard/master
...
Really small correction.
This anti-example in the Closures section is supposed to fail because of a borrow, but it was failing at the type inference because of insufficient type information.
This makes it fail for the expected reason.
2015-01-15 14:11:54 -08:00
Alex Crichton
65b286d834
rollup merge of #21109 : steveklabnik/gh17224
...
Fixes #17224
2015-01-15 14:11:48 -08:00
Alex Crichton
d7009e6f31
rollup merge of #21105 : csouth3/kill-box-import
...
Closes #21093 .
r? @steveklabnik
cc @alexcrichton
I tested with `make check-docs` and this passes that. Hope that was enough.
2015-01-15 14:11:46 -08:00
Alex Crichton
7aa7707af9
rollup merge of #21040 : steveklabnik/gh20037
...
Fixes #20037 .
2015-01-15 14:11:37 -08:00
Alex Crichton
9d6e1f921b
rollup merge of #21038 : steveklabnik/gh20471
...
Fixes #20471 .
2015-01-15 14:11:36 -08:00
Alex Crichton
21effeb611
rollup merge of #21031 : steveklabnik/gh19067
...
Fixes #19067
2015-01-15 14:11:35 -08:00
Alex Crichton
8d0b937964
rollup merge of #21029 : steveklabnik/gh19924
...
Fixes #19924
2015-01-15 14:11:35 -08:00
Alex Crichton
cfbf313282
rollup merge of #21023 : steveklabnik/gh20840
...
Fixes #20840
2015-01-15 14:11:34 -08:00
Alex Crichton
e06863ef64
rollup merge of #21015 : steveklabnik/gh20852
...
Fixes #20852
2015-01-15 14:11:33 -08:00
Alex Crichton
c6a9877039
rollup merge of #21013 : steveklabnik/gh20914
...
Fixes #20914
2015-01-15 14:11:33 -08:00
Alex Crichton
73660a11c9
rollup merge of #21011 : steveklabnik/gh20993
...
Fixes #20993
2015-01-15 14:11:32 -08:00
Alex Crichton
dbbe506c10
rollup merge of #21001 : camjackson/master
...
With the code samples as they are, the compiler says:
`feature has been added to Rust, directive not necessary`
2015-01-15 14:11:31 -08:00
Alex Crichton
c478c6ac91
rollup merge of #20988 : ciphergoth/task-to-thread
...
"Tasks" are no longer a thing in Rust; refer to threads instead. Work is still needed on [threads.md](threads.md).
2015-01-15 14:11:30 -08:00
Alex Crichton
37d20f256a
rollup merge of #20986 : alkor/doc-fixes
...
Corrections in TRPL macros guide
2015-01-15 14:11:29 -08:00
Alex Crichton
eb94c357d0
rollup merge of #20929 : laurilehmijoki/master
...
The sentence is easier to read once we move the word "again" away from the last position.
2015-01-15 14:11:28 -08:00
Alex Crichton
d3c5cf1b35
rollup merge of #20892 : CarVac/master
...
`uint` was recently deprecated, so in following the use of `i32` in the first parts, replace all copies of `uint` with `u32`.
2015-01-15 14:11:28 -08:00
Steve Klabnik
fd603cd263
Clarify function return style.
...
Suggested here: http://stackoverflow.com/a/27962076/24817
2015-01-15 14:47:21 -05:00
York Xiang
bf899e997e
fix wrong link
2015-01-15 01:11:28 +08:00
Toni Cárdenas
428da78de1
TRPL: Anti-example failing for the wrong reason.
...
Really small correction.
This anti-example in the Closures section is supposed to fail because of a borrow, but it was failing at the type inference because of insufficient type information.
This makes it fail for the expected reason.
2015-01-14 15:24:41 +01:00
Steve Klabnik
ad0ce88c6c
Provide example of generic inverse()
...
Fixes #17224
2015-01-13 15:42:38 -05:00
Chase Southwood
07f723f19b
Remove unneeded box import in examples
2015-01-13 12:56:10 -06:00
Greg Chapple
4b14f67df3
Replace usage of deriving with derive in docs
2015-01-13 13:57:09 +00:00
JONNALAGADDA Srinivas
ac110df0ff
Expand the section on closures in TRPL.
...
* Include an illustration of a function that accepts two closures.
2015-01-13 10:14:18 +05:30
Adam Roben
1c0acb9d91
Match prose with code when discussing Ordering values
...
Now both the enum values and the prose describing them mention the values in the same order.
2015-01-12 16:18:02 -05:00
Steve Klabnik
16a8c4d238
Don't use 'synonym' with regards to newtypes
...
Fixes #20037 .
2015-01-12 15:30:11 -05:00
Steve Klabnik
2297b0cb00
Elaborate on destructuring let
...
Fixes #20471 .
2015-01-12 15:28:09 -05:00
Steve Klabnik
b704983ee9
Improve the ownership guide a tad
...
Fixes #19924
2015-01-12 15:12:51 -05:00
Steve Klabnik
db7de969cf
Improve clarity of paragraph in the pointer guide
...
Fixes #19067
2015-01-12 13:57:09 -05:00
Lauri Lehmijoki
eabf208285
Ease parsing of an English sentence
2015-01-12 19:42:52 +02:00
Steve Klabnik
95f9e309f7
Clean up wording around uninitialized values.
...
Fixes #20840
2015-01-12 11:49:54 -05:00
Steve Klabnik
be407180d7
Link to sections in the book's README.md
...
Fixes #20852
2015-01-12 10:59:21 -05:00
Steve Klabnik
c403794310
Small fix in the book
...
Fixes #20914
2015-01-12 10:47:56 -05:00
Steve Klabnik
ba9e223c57
Small grammar fix in the book
...
Fixes #20993
2015-01-12 10:45:32 -05:00
Alexander Korolkov
a3d87fa448
Fix text in TRPL macros guide to match the example
...
Also, update description of macro invocation syntax:
after https://github.com/rust-lang/rust/pull/20563 there is
a number of additional limitations on macro syntax.
2015-01-12 17:39:18 +03:00
Cam Jackson
e1ff480e43
Remove usage and reference of feature(globs) from the book
2015-01-12 23:06:03 +11:00
Paul Crowley
8eba032f52
Purge references to Rust tasks from TRPL.
2015-01-12 09:15:33 +00:00
CarVac
9302dc5d9e
Replace uint with u32 in trpl/guessing-game.md
...
uint was recently deprecated, so in following the use of i32 at first,
replace all references to uint with u32.
Also change literals from e.g. 100u to 100, so that they are no longer
usize.
2015-01-11 21:00:42 -05:00
bors
8d88ac12c1
Merge pull request #20966 from Valloric/ownership-fix
...
Fixing integer usage in ownership doc
Reviewed-by: steveklabnik
2015-01-12 00:21:31 +00:00
bors
8c824c5b65
Merge pull request #20956 from angst7/docfixes1
...
replace deprecated uint references with u32 in trpl/looping.md
Reviewed-by: Gankro
2015-01-12 00:21:31 +00:00
bors
352c81bb4b
Merge pull request #20933 from gifnksm/patch-1
...
TRPL: `cargo build` doesn't run executables
Reviewed-by: alexcrichton
2015-01-12 00:21:30 +00:00
bors
f72c719b71
Merge pull request #20930 from charmeleon/master
...
Switching out range(0,10) example to 0..10. Tests fine
Reviewed-by: brson
2015-01-12 00:21:29 +00:00
bors
268e2bff97
Merge pull request #20926 from xnil/patch-1
...
Hepburn romanization of さようなら
Reviewed-by: huonw
2015-01-12 00:21:29 +00:00
bors
10305fcfdc
Merge pull request #20898 from sebras/trpl
...
Cosmetic updates to TRPL text
Reviewed-by: steveklabnik
2015-01-12 00:21:25 +00:00
bors
3e215200f6
Merge pull request #20877 from killercup/patch-4
...
Error Guide: Add Line Break to Robert Burns Quote
Reviewed-by: steveklabnik
2015-01-12 00:21:23 +00:00
bors
8e0bb03841
Merge pull request #20820 from sellibitze/closure-doc
...
Closure documentation: Fix boxed closure left-over
Reviewed-by: steveklabnik
2015-01-12 00:21:23 +00:00
Strahinja Val Markovic
d355da6e6f
Fixing integer usage in ownership doc
...
`int` doesn't exist anymore. Usage of its equivalent `isize` is
discouraged since its size is platform-dependent. `i32` is used instead
in the examples. Also, integer suffixes aren't needed in the examples
anymore so we can just write `5` instead of `5i`.
2015-01-11 12:42:03 -08:00
Matt Roche
c989bd4ab7
replace deprecated uint references with u32
...
Replaced uint references with u32 to prevent compiler warnings.
2015-01-11 13:55:23 -05:00
NAKASHIMA, Makoto
add9225038
cargo build
doesn't run the executables
2015-01-11 17:40:42 +09:00
Erick Rivas
8e42f1e6c3
Switching out range(0,10) example to 0..10. Tests fine
2015-01-11 02:15:29 -06:00
Carter Hinsley
da15417b9d
Correct romanization of さようなら
2015-01-11 01:53:34 -05:00
Sebastian Rasmussen
64b1a0da98
Cosmetic updates to TRPL text
...
* Make messages match rustc's error messages
* Use correct function name in example
* Rewording to match previously presented material
2015-01-10 23:11:26 +01:00
Pascal Hertleif
6ff5ab1d01
Add Line Break to Robert Burns Quote
2015-01-10 15:47:52 +01:00
bors
3b03c20c6d
Merge pull request #20851 from englishm/patch-1
...
Docs: Should be `assert_eq!` not `assert_eq`
Reviewed-by: sfackler
2015-01-10 14:15:12 +00:00
bors
52e5ae786d
Merge pull request #20849 from scode/scode/fix-book-typo
...
Fix typo in documentation.
Reviewed-by: sfackler
2015-01-10 14:15:12 +00:00
bors
1ca581d440
Merge pull request #20833 from nstoddard/master
...
Fix a couple wording issues in TRPL book
Reviewed-by: Gankro
2015-01-10 14:15:11 +00:00
bors
507d9575bd
Merge pull request #20819 from GuillaumeGomez/master
...
Fixes typo
Reviewed-by: alexcrichton
2015-01-10 14:15:11 +00:00
bors
2bb9b3f0be
Merge pull request #20818 from rgs1/fix-guide
...
Remove extra dangling period
Reviewed-by: alexcrichton
2015-01-10 14:15:10 +00:00
bors
e912f13a94
Merge pull request #20817 from killercup/patch-2
...
Update Conclusion of The Rust Programming Language
Reviewed-by: steveklabnik
2015-01-10 14:15:10 +00:00
Mike English
68ecfe0b61
Should be assert_eq!
not assert_eq
2015-01-10 01:52:51 -05:00
Peter Schuller
d873aeeb92
Fix typo in documentation.
2015-01-09 22:35:18 -08:00
bors
9205d74fe0
auto merge of #20782 : iKevinY/rust/trpl-formatting, r=steveklabnik
...
Here's my PR for the changes discussed in #19823 . I decided to leave `_these_` types of italics the way there were because it differentiates the use of italics for emphasis from `*key term*` italics. Otherwise, bolded terms have been changed to italics, and single and double quotes have been changed appropriately, depending on their context (my judgement may not be the best, though).
r? @steveklabnik (congratulations on #19897 being finalized and merged, by the way!)
2015-01-10 03:45:11 +00:00
Nathan Stoddard
2a29296ea3
Fix a couple wording issues in trpl book
2015-01-09 17:21:30 -05:00
Sebastian Gesemann
d4b70fe6c6
documentation: Fix boxed closure left-over and add some words on why we use a type parameter for closures.
2015-01-09 20:10:14 +01:00
Guillaume Gomez
ba462b88e9
Update advanced.md
2015-01-09 20:08:30 +01:00
Keegan McAllister
a96a8b2b25
Update macro scope intro
2015-01-09 11:06:17 -08:00
Raul Gutierrez S
28723048a5
Remove extra dangling period
...
Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>
2015-01-09 10:54:00 -08:00
Pascal Hertleif
1a602c1779
Update Conclusion of The Rust Programming Language
...
This replaces a obsolete conclusion (based on the original, basic Guide) with
links to further documentation sources.
2015-01-09 19:48:27 +01:00
Kevin Yap
8f61814641
Standardize punctuation & formatting of TRPL
...
This commit is an attempt to standardize the use of punctuation and
formatting in "The Rust Programming Language" as discussed in #19823 .
- Convert bold text to italicized textcwhen referring to terminology.
- Convert single-quoted text to italicized or double-quoted text,
depending on context.
- Use double quotes only in the case of scare quotes or quotations.
2015-01-08 17:15:26 -08:00
Alex Crichton
7541f82fab
Fix dead links in the guide and reorganize
2015-01-08 10:27:03 -08:00
Steve Klabnik
16a6ebd1f6
"The Rust Programming Language"
...
This pulls all of our long-form documentation into a single document,
nicknamed "the book" and formally titled "The Rust Programming
Language."
A few things motivated this change:
* People knew of The Guide, but not the individual Guides. This merges
them together, helping discoverability.
* You can get all of Rust's longform documentation in one place, which
is nice.
* We now have rustbook in-tree, which can generate this kind of
documentation. While its style is basic, the general idea is much
better: a table of contents on the left-hand side.
* Rather than a almost 10,000-line guide.md, there are now smaller files
per section.
2015-01-08 12:02:11 -05:00